diff options
author | Florian Weimer <fweimer@redhat.com> | 2017-04-13 13:22:51 +0200 |
---|---|---|
committer | Florian Weimer <fweimer@redhat.com> | 2017-04-13 13:22:51 +0200 |
commit | 44500cbb25bc6e76723304b9ff39f875c04309f9 (patch) | |
tree | 924aa24c754a523da4c0f381f9f269ddc5c327c9 /resolv/res_query.c | |
parent | e14a27723cc3a154d67f3f26e719d08c0ba9ad25 (diff) | |
download | glibc-44500cbb25bc6e76723304b9ff39f875c04309f9.zip glibc-44500cbb25bc6e76723304b9ff39f875c04309f9.tar.gz glibc-44500cbb25bc6e76723304b9ff39f875c04309f9.tar.bz2 |
resolv: Remove EDNS fallback [BZ #21369]
EDNS is disabled by default (so there is interoperability issue), and
the fallback code is problematic because it prevents an application
from obtaining DNSSEC data after a FORMERR response.
Diffstat (limited to 'resolv/res_query.c')
-rw-r--r-- | resolv/res_query.c | 16 |
1 files changed, 1 insertions, 15 deletions
diff --git a/resolv/res_query.c b/resolv/res_query.c index c3ebcbf..ec65bab 100644 --- a/resolv/res_query.c +++ b/resolv/res_query.c @@ -122,7 +122,6 @@ __libc_res_nquery(res_state statp, HEADER *hp = (HEADER *) answer; HEADER *hp2; int n, use_malloc = 0; - u_int oflags = statp->_flags; size_t bufsize = (type == T_QUERY_A_AND_AAAA ? 2 : 1) * QUERYSIZE; u_char *buf = alloca (bufsize); @@ -145,8 +144,7 @@ __libc_res_nquery(res_state statp, query1, bufsize); if (n > 0) { - if ((oflags & RES_F_EDNS0ERR) == 0 - && (statp->options & (RES_USE_EDNS0|RES_USE_DNSSEC)) != 0) + if ((statp->options & (RES_USE_EDNS0|RES_USE_DNSSEC)) != 0) { /* Use RESOLV_EDNS_BUFFER_SIZE because the receive buffer can be reallocated. */ @@ -170,7 +168,6 @@ __libc_res_nquery(res_state statp, n = res_nmkquery(statp, QUERY, name, class, T_AAAA, NULL, 0, NULL, query2, bufsize - nused); if (n > 0 - && (oflags & RES_F_EDNS0ERR) == 0 && (statp->options & (RES_USE_EDNS0|RES_USE_DNSSEC)) != 0) /* Use RESOLV_EDNS_BUFFER_SIZE because the receive buffer can be reallocated. */ @@ -187,7 +184,6 @@ __libc_res_nquery(res_state statp, query1, bufsize); if (n > 0 - && (oflags & RES_F_EDNS0ERR) == 0 && (statp->options & (RES_USE_EDNS0|RES_USE_DNSSEC)) != 0) { /* Use RESOLV_EDNS_BUFFER_SIZE if the receive buffer @@ -215,16 +211,6 @@ __libc_res_nquery(res_state statp, } } if (__glibc_unlikely (n <= 0)) { - /* If the query choked with EDNS0, retry without EDNS0. */ - if ((statp->options & (RES_USE_EDNS0|RES_USE_DNSSEC)) != 0 - && ((oflags ^ statp->_flags) & RES_F_EDNS0ERR) != 0) { - statp->_flags |= RES_F_EDNS0ERR; -#ifdef DEBUG - if (statp->options & RES_DEBUG) - printf(";; res_nquery: retry without EDNS0\n"); -#endif - goto again; - } #ifdef DEBUG if (statp->options & RES_DEBUG) printf(";; res_query: mkquery failed\n"); |