From: Mark Andrews Date: Thu, 11 Sep 2014 03:34:17 +0000 (+1000) Subject: silence compiler warning X-Git-Tag: v9.11.0a1~1378^2~40^2 X-Git-Url: http://git.ipfire.org/gitweb/?a=commitdiff_plain;h=1bf72e53256c70e9463799e83184d8b8d37027de;p=thirdparty%2Fbind9.git silence compiler warning --- diff --git a/lib/dns/resolver.c b/lib/dns/resolver.c index 43c746dbb7d..4e869d73ef3 100644 --- a/lib/dns/resolver.c +++ b/lib/dns/resolver.c @@ -7682,9 +7682,21 @@ resquery_response(isc_task_t *task, isc_event_t *event) { } /* * XXXMPA we should really test against the version of - * EDNS we sent in the request. + * EDNS we sent in the request. Some servers return + * BADVERS for unknown EDNS options. + * RFC 2671 was not clear that they should be ignored. + * RFC 6891 is clear that that they should be ignored. + * If we are supporting EDNS > 0 then perform strict + * version checking of badvers responses. We won't + * be sending SIT etc. in that case. */ - if (version < DNS_EDNS_VERSION) { +#if DNS_EDNS_VERSION == 0 + /* Avoids a compiler warning with < 0 */ + if (version <= DNS_EDNS_VERSION) +#else + if (version < DNS_EDNS_VERSION) +#endif + { dns_adb_changeflags(fctx->adb, query->addrinfo, flags, mask); } else {