From: Mark Andrews Date: Thu, 30 Nov 2023 00:18:41 +0000 (+1100) Subject: Don't send NOTIFY over disabled address families X-Git-Tag: v9.20.0~16^2~3 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5d9962551547e13274ff7d7f5af9abf4f4982341;p=thirdparty%2Fbind9.git Don't send NOTIFY over disabled address families --- diff --git a/lib/dns/zone.c b/lib/dns/zone.c index 8aaeec0cc6d..901c52d6178 100644 --- a/lib/dns/zone.c +++ b/lib/dns/zone.c @@ -12259,7 +12259,14 @@ notify_find_address(dns_notify_t *notify) { dns_adb_t *adb = NULL; REQUIRE(DNS_NOTIFY_VALID(notify)); - options = DNS_ADBFIND_WANTEVENT | DNS_ADBFIND_INET | DNS_ADBFIND_INET6; + + options = DNS_ADBFIND_WANTEVENT; + if (isc_net_probeipv4() != ISC_R_DISABLED) { + options |= DNS_ADBFIND_INET; + } + if (isc_net_probeipv6() != ISC_R_DISABLED) { + options |= DNS_ADBFIND_INET6; + } dns_view_getadb(notify->zone->view, &adb); if (adb == NULL) { @@ -12680,6 +12687,10 @@ zone_notify(dns_zone_t *zone, isc_time_t *now) { src = dns_remote_sourceaddr(&zone->notify); INSIST(isc_sockaddr_pf(&src) == isc_sockaddr_pf(&dst)); + if (isc_sockaddr_disabled(&dst)) { + goto next; + } + if (notify_isqueued(zone, flags, NULL, &dst, key, transport)) { if (key != NULL) { dns_tsigkey_detach(&key);