From 2d0671cbbdade9013d6fd5153d01bd5e1d3f60cb Mon Sep 17 00:00:00 2001 From: Adam Tkac Date: Mon, 27 Jul 2009 07:33:48 -0700 Subject: Define and implement RES_USE_DNSSEC option in resolver. --- resolv/res_query.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'resolv/res_query.c') diff --git a/resolv/res_query.c b/resolv/res_query.c index 9ffb3e3..5ff352e 100644 --- a/resolv/res_query.c +++ b/resolv/res_query.c @@ -147,7 +147,7 @@ __libc_res_nquery(res_state statp, if (n > 0) { if ((oflags & RES_F_EDNS0ERR) == 0 - && (statp->options & RES_USE_EDNS0) != 0) + && (statp->options & (RES_USE_EDNS0|RES_USE_DNSSEC)) != 0) { n = __res_nopt(statp, n, query1, bufsize, anslen / 2); if (n < 0) @@ -169,7 +169,7 @@ __libc_res_nquery(res_state statp, NULL, query2, bufsize - nused); if (n > 0 && (oflags & RES_F_EDNS0ERR) == 0 - && (statp->options & RES_USE_EDNS0) != 0) + && (statp->options & (RES_USE_EDNS0|RES_USE_DNSSEC)) != 0) n = __res_nopt(statp, n, query2, bufsize - nused - n, anslen / 2); nquery2 = n; @@ -184,7 +184,7 @@ __libc_res_nquery(res_state statp, if (n > 0 && (oflags & RES_F_EDNS0ERR) == 0 - && (statp->options & RES_USE_EDNS0) != 0) + && (statp->options & (RES_USE_EDNS0|RES_USE_DNSSEC)) != 0) n = __res_nopt(statp, n, query1, bufsize, anslen); nquery1 = n; @@ -203,7 +203,7 @@ __libc_res_nquery(res_state statp, } if (__builtin_expect (n <= 0, 0)) { /* If the query choked with EDNS0, retry without EDNS0. */ - if ((statp->options & RES_USE_EDNS0) != 0 + if ((statp->options & (RES_USE_EDNS0|RES_USE_DNSSEC)) != 0 && ((oflags ^ statp->_flags) & RES_F_EDNS0ERR) != 0) { statp->_flags |= RES_F_EDNS0ERR; #ifdef DEBUG -- cgit v1.1