2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-30 14:07:59 +00:00

Merge branch '4669-error-sending-notify-to-ipv6-secondary' into 'main'

Wrong source address used for IPv6 notify messages

Closes #4669

See merge request isc-projects/bind9!8935
This commit is contained in:
Mark Andrews 2024-04-12 00:16:01 +00:00
commit 381273f89f
6 changed files with 10 additions and 1 deletions

View File

@ -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]

View File

@ -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

View File

@ -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";

View File

@ -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;

View File

@ -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"

View 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) {