Commit b5167607 authored by Mark Andrews's avatar Mark Andrews

make declaration and use of setnocookie fully conditional

parent 6bd6bd6d
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment