summaryrefslogtreecommitdiff
path: root/src/lib/libc/net/res_mkquery.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/libc/net/res_mkquery.c')
-rw-r--r--src/lib/libc/net/res_mkquery.c17
1 files changed, 13 insertions, 4 deletions
diff --git a/src/lib/libc/net/res_mkquery.c b/src/lib/libc/net/res_mkquery.c
index 61595a6e8c..e414b5060d 100644
--- a/src/lib/libc/net/res_mkquery.c
+++ b/src/lib/libc/net/res_mkquery.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: res_mkquery.c,v 1.9 2001/06/11 10:06:00 itojun Exp $ */ 1/* $OpenBSD: res_mkquery.c,v 1.10 2001/07/31 22:02:18 jakob Exp $ */
2 2
3/* 3/*
4 * ++Copyright++ 1985, 1993 4 * ++Copyright++ 1985, 1993
@@ -60,7 +60,7 @@
60static char sccsid[] = "@(#)res_mkquery.c 8.1 (Berkeley) 6/4/93"; 60static char sccsid[] = "@(#)res_mkquery.c 8.1 (Berkeley) 6/4/93";
61static char rcsid[] = "$From: res_mkquery.c,v 8.5 1996/08/27 08:33:28 vixie Exp $"; 61static char rcsid[] = "$From: res_mkquery.c,v 8.5 1996/08/27 08:33:28 vixie Exp $";
62#else 62#else
63static char rcsid[] = "$OpenBSD: res_mkquery.c,v 1.9 2001/06/11 10:06:00 itojun Exp $"; 63static char rcsid[] = "$OpenBSD: res_mkquery.c,v 1.10 2001/07/31 22:02:18 jakob Exp $";
64#endif 64#endif
65#endif /* LIBC_SCCS and not lint */ 65#endif /* LIBC_SCCS and not lint */
66 66
@@ -221,8 +221,17 @@ res_opt(n0, buf, buflen, anslen)
221 cp += INT16SZ; 221 cp += INT16SZ;
222 *cp++ = NOERROR; /* extended RCODE */ 222 *cp++ = NOERROR; /* extended RCODE */
223 *cp++ = 0; /* EDNS version */ 223 *cp++ = 0; /* EDNS version */
224 __putshort(0, cp); /* MBZ */ 224 if (_res.options & RES_USE_DNSSEC) {
225 cp += INT16SZ; 225#ifdef DEBUG
226 if (_res.options & RES_DEBUG)
227 printf(";; res_opt()... ENDS0 DNSSEC OK\n");
228#endif /* DEBUG */
229 __putshort(DNS_MESSAGEEXTFLAG_DO, cp); /* EDNS Z field */
230 cp += INT16SZ;
231 } else {
232 __putshort(0, cp); /* EDNS Z field */
233 cp += INT16SZ;
234 }
226 __putshort(0, cp); /* RDLEN */ 235 __putshort(0, cp); /* RDLEN */
227 cp += INT16SZ; 236 cp += INT16SZ;
228 hp->arcount = htons(ntohs(hp->arcount) + 1); 237 hp->arcount = htons(ntohs(hp->arcount) + 1);