aboutsummaryrefslogtreecommitdiff
path: root/resolv/res_mkquery.c
diff options
context:
space:
mode:
authorAdam Tkac <atkac@redhat.com>2009-07-27 07:33:48 -0700
committerUlrich Drepper <drepper@redhat.com>2009-07-27 07:33:48 -0700
commit2d0671cbbdade9013d6fd5153d01bd5e1d3f60cb (patch)
tree6dec9333bf00d6bbf468bd6280ee4162e87f3450 /resolv/res_mkquery.c
parent09cd1f575476a48b262e4e45997bb56753f9d4f5 (diff)
downloadglibc-2d0671cbbdade9013d6fd5153d01bd5e1d3f60cb.zip
glibc-2d0671cbbdade9013d6fd5153d01bd5e1d3f60cb.tar.gz
glibc-2d0671cbbdade9013d6fd5153d01bd5e1d3f60cb.tar.bz2
Define and implement RES_USE_DNSSEC option in resolver.
Diffstat (limited to 'resolv/res_mkquery.c')
-rw-r--r--resolv/res_mkquery.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/resolv/res_mkquery.c b/resolv/res_mkquery.c
index 2dda4c0..2bc2d24 100644
--- a/resolv/res_mkquery.c
+++ b/resolv/res_mkquery.c
@@ -247,7 +247,15 @@ __res_nopt(res_state statp,
NS_PUT16(MIN(anslen, 0xffff), cp); /* CLASS = UDP payload size */
*cp++ = NOERROR; /* extended RCODE */
*cp++ = 0; /* EDNS version */
- /* XXX Once we support DNSSEC we change the flag value here. */
+
+ if (statp->options & RES_USE_DNSSEC) {
+#ifdef DEBUG
+ if (statp->options & RES_DEBUG)
+ printf(";; res_opt()... ENDS0 DNSSEC\n");
+#endif
+ flags |= NS_OPT_DNSSEC_OK;
+ }
+
NS_PUT16(flags, cp);
NS_PUT16(0, cp); /* RDLEN */
hp->arcount = htons(ntohs(hp->arcount) + 1);