From: Mark Andrews Date: Thu, 15 Feb 2018 01:36:03 +0000 (+1100) Subject: make declaration and use of setnocookie fully conditional X-Git-Tag: v9.13.0~155^2~3^2~29 X-Git-Url: http://git.ipfire.org/gitweb/index.cgi?a=commitdiff_plain;h=b5167607efcfe6e0cdc6a0d0f47ed2edb927f874;p=thirdparty%2Fbind9.git make declaration and use of setnocookie fully conditional --- diff --git a/lib/dns/resolver.c b/lib/dns/resolver.c index c0f254b1292..99831c237ad 100644 --- a/lib/dns/resolver.c +++ b/lib/dns/resolver.c @@ -9348,9 +9348,10 @@ rctx_badserver(respctx_t *rctx, isc_result_t result) { } } else if (fctx->rmessage->rcode == dns_rcode_badvers) { unsigned int version; - isc_boolean_t setnocookie = ISC_FALSE; #if DNS_EDNS_VERSION > 0 unsigned int flags, mask; +#else + isc_boolean_t setnocookie = ISC_FALSE; #endif /* @@ -9362,8 +9363,10 @@ rctx_badserver(respctx_t *rctx, isc_result_t result) { */ if (dns_adb_getcookie(fctx->adb, query->addrinfo, cookie, sizeof(cookie)) == 0U) { +#if DNS_EDNS_VERSION <= 0 if (!NOCOOKIE(query->addrinfo)) setnocookie = ISC_TRUE; +#endif dns_adb_changeflags(fctx->adb, query->addrinfo, FCTX_ADDRINFO_NOCOOKIE, FCTX_ADDRINFO_NOCOOKIE);