diff --git a/CHANGES b/CHANGES index d77f8fe866..601118ebe7 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,6 @@ +6370. [bug] Wrong source address used for IPv6 notify messages. + [GL #4669] + 6369. [func] The 'fixed' value for the 'rrset-order' option has been marked and documented as deprecated. [GL #4446] diff --git a/bin/tests/system/notify/ns2/example2.db b/bin/tests/system/notify/ns2/example2.db index c762dd611d..bc884262c8 100644 --- a/bin/tests/system/notify/ns2/example2.db +++ b/bin/tests/system/notify/ns2/example2.db @@ -22,6 +22,7 @@ example. NS ns2.example. ns2.example. A 10.53.0.2 example. NS ns3.example. ns3.example. A 10.53.0.3 +ns3.example. AAAA fd92:7065:b8e:ffff::3 $ORIGIN example. a A 10.0.0.2 diff --git a/bin/tests/system/notify/ns2/named.conf.in b/bin/tests/system/notify/ns2/named.conf.in index 203f23ca6e..3f16e229db 100644 --- a/bin/tests/system/notify/ns2/named.conf.in +++ b/bin/tests/system/notify/ns2/named.conf.in @@ -14,6 +14,7 @@ options { query-source address 10.53.0.2; notify-source 10.53.0.2; + notify-source-v6 fd92:7065:b8e:ffff::2; transfer-source 10.53.0.2; port @PORT@; pid-file "named.pid"; diff --git a/bin/tests/system/notify/ns3/named.conf.in b/bin/tests/system/notify/ns3/named.conf.in index 4761622651..73338a4a30 100644 --- a/bin/tests/system/notify/ns3/named.conf.in +++ b/bin/tests/system/notify/ns3/named.conf.in @@ -18,7 +18,7 @@ options { port @PORT@; pid-file "named.pid"; listen-on { 10.53.0.3; }; - listen-on-v6 { none; }; + listen-on-v6 { fd92:7065:b8e:ffff::3; }; recursion yes; notify yes; dnssec-validation no; diff --git a/bin/tests/system/notify/tests.sh b/bin/tests/system/notify/tests.sh index 788947a6c0..d929add54c 100644 --- a/bin/tests/system/notify/tests.sh +++ b/bin/tests/system/notify/tests.sh @@ -109,6 +109,7 @@ wait_for_log_re 45 "transfer of 'example/IN' from 10.53.0.2#.*success" ns3/named test_start "checking notify message was logged" grep 'notify from 10.53.0.2#[0-9][0-9]*: serial 2$' ns3/named.run >/dev/null || ret=1 +grep 'refused notify from non-primary: fd92:7065:b8e:ffff::2#[0-9][0-9]*$' ns3/named.run >/dev/null || ret=1 test_end test_start "checking example2 loaded" 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) {