Open Perflyst opened 4 years ago
If i'm not missing something, the supermaster checks happen in a single sequential thread (except for those coming in over TCP) so we should be able to fix this with a simple domain existence check.
If i'm not missing something, the supermaster checks happen in a single sequential thread (except for those coming in over TCP) so we should be able to fix this with a simple domain existence check.
Doesn't that create race conditions? If you assume the master will alternatively use the IPv4 and IPv6 to do the transfer, one of them will win, and therefore the other lose. If the first zone was accepted from an IPv4 address, it can never be updated anymore once the server starts using IPv6, even if the supermaster was added as a second row to supermasters
, this time with IPv6 address, because the IPs don't match.
Isn't the real fix to add an ip6
field to supermasters
and a master6
to domains
?
Or, the 'check if IP is allowed to do to AXFR' needs to expand its IP and look up related ones in supermasters:
1.2.3.4
and aa::ff
master
record 1.2.3.4
, because that's where it came from at one point.aa:ff
does a AXFRaa::ff
!= 1.2.3.4
-> rejectaa::ff
in select distinct s2.ip from supermasters as s1 inner join supermasters as s2 on s1.nameserver = s2.nameserver where s1.ip = 'aa::ff';
. Disclaimer: there are some caveats when there are supermasters with the same IP but different nameserver
values. I haven't fully analyzed the security implications.Isn't the real fix to add an
ip6
field tosupermasters
and amaster6
todomains
?
We already have a generic solution for that - when adding a domain, we pick -all- IPs that have the same nameserver
and account
. This covers v4+v6 but also domains that have multiple v4 masters.
Is that also in version 4.1.1-1 from Ubuntu 18.04? I still get
Received NOTIFY for example.nl from 2a01:1b0::snip which is not a master
After or before (it changes) the successful transfer over IPv4.
The IPv4 and IPv6 are both in the supermasters table.
Is that also in version 4.1.1-1 from Ubuntu 18.04? I still get
I don't know. This is starting to look like a support question. I suggest upgrading, and then asking these questions on IRC or the pdns-users mailing list (see https://www.powerdns.com/opensource.html )
Short description
If PowerDNS is configured with v4 and v6 supermasters and receives a notify it tries to add the domain twice.
Environment
Steps to reproduce
Expected behaviour
Superslave accepts notify and adds new slave zone with ipv4 and ipv6 from master as master server.
Actual behaviour
Superslave accepts notify and adds new slave zone with ipv4 and ipv6 from master as master server. But it also tries to add it again with the IPv6 only.
Other information
Logs on slave:
supermasters table on slave