summaryrefslogtreecommitdiff
path: root/resolv
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2008-08-12 06:56:53 +0000
committerUlrich Drepper <drepper@redhat.com>2008-08-12 06:56:53 +0000
commitbe1c55f2657610f649ecda983ac3b0fe9af7f86b (patch)
treead47b45c211f927b4d22b3be2263ce99f946a425 /resolv
parentac84eeca917716f1a7657e45eacd15232b4143c1 (diff)
(res_nmkquery): Call ns_name_compress directly instead of going through dn_comp.
Diffstat (limited to 'resolv')
-rw-r--r--resolv/res_mkquery.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/resolv/res_mkquery.c b/resolv/res_mkquery.c
index 416bf1c32b..ae0cdb417e 100644
--- a/resolv/res_mkquery.c
+++ b/resolv/res_mkquery.c
@@ -160,7 +160,10 @@ res_nmkquery(res_state statp,
if ((buflen -= QFIXEDSZ) < 0)
return (-1);
compose:
- if ((n = dn_comp(dname, cp, buflen, dnptrs, lastdnptr)) < 0)
+ n = ns_name_compress(dname, cp, buflen,
+ (const u_char **) dnptrs,
+ (const u_char **) lastdnptr);
+ if (n < 0)
return (-1);
cp += n;
buflen -= n;
@@ -172,7 +175,9 @@ res_nmkquery(res_state statp,
/*
* Make an additional record for completion domain.
*/
- n = dn_comp((char *)data, cp, buflen, dnptrs, lastdnptr);
+ n = ns_name_compress((char *)data, cp, buflen,
+ (const u_char **) dnptrs,
+ (const u_char **) lastdnptr);
if (__builtin_expect (n < 0, 0))
return (-1);
cp += n;