From 40fd4cd407fd2a215d754153c21baaaa3a523f7b Mon Sep 17 00:00:00 2001 From: Mark Andrews Date: Thu, 4 Apr 2024 10:35:23 +1100 Subject: [PATCH] Wrong source address used for IPv6 notify messages 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 | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/dns/zone.c b/lib/dns/zone.c index d70155bf74..cf09283221 100644 --- a/lib/dns/zone.c +++ b/lib/dns/zone.c @@ -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) {