]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Don't send NOTIFY over disabled address families
authorMark Andrews <marka@isc.org>
Thu, 30 Nov 2023 00:18:41 +0000 (11:18 +1100)
committerMark Andrews <marka@isc.org>
Mon, 3 Jun 2024 08:34:31 +0000 (18:34 +1000)
lib/dns/zone.c

index 8aaeec0cc6ded0ae6e994354ad70b079c25d7b55..901c52d6178184c565410646a15f9f7e256df4ec 100644 (file)
@@ -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);