]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Wrong source address used for IPv6 notify messages
authorMark Andrews <marka@isc.org>
Wed, 3 Apr 2024 23:35:23 +0000 (10:35 +1100)
committerMark Andrews <marka@isc.org>
Thu, 11 Apr 2024 18:05:25 +0000 (18:05 +0000)
The source address field of 'newnotify' was not updated from the
default (0.0.0.0) when the destination address was an IPv6 address.
This resulted in the messages failing to be sent.  Set the source
address to :: when the destination address is an IPv6 address.

lib/dns/zone.c

index d70155bf7465d45100d5f5f6a93b767fdf42e31b..cf0928322118db6061fafb3b661c91bace0eb536 100644 (file)
@@ -12535,6 +12535,9 @@ notify_send(dns_notify_t *notify) {
                zone_iattach(notify->zone, &newnotify->zone);
                ISC_LIST_APPEND(newnotify->zone->notifies, newnotify, link);
                newnotify->dst = dst;
+               if (isc_sockaddr_pf(&dst) == AF_INET6) {
+                       isc_sockaddr_any6(&newnotify->src);
+               }
                startup = ((notify->flags & DNS_NOTIFY_STARTUP) != 0);
                result = notify_send_queue(newnotify, startup);
                if (result != ISC_R_SUCCESS) {