]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
ixfrdist: use IPV6_V6ONLY on listening sockets, closes #13878 13949/head
authorPeter van Dijk <peter.van.dijk@powerdns.com>
Tue, 19 Mar 2024 13:54:05 +0000 (14:54 +0100)
committerPeter van Dijk <peter.van.dijk@powerdns.com>
Tue, 19 Mar 2024 13:54:05 +0000 (14:54 +0100)
docs/upgrading.rst
pdns/ixfrdist.cc

index e43e0f593b0352dd12f064d79a54dc8ccb064e0b..b0713eee9c5debefd2e879a04cc6dd86461b9f6e 100644 (file)
@@ -8,6 +8,15 @@ Please upgrade to the PowerDNS Authoritative Server 4.0.0 from 3.4.2+.
 See the `3.X <https://doc.powerdns.com/3/authoritative/upgrading/>`__
 upgrade notes if your version is older than 3.4.2.
 
+4.9.0 to 5.0.0/master
+--------------
+
+ixfrdist IPv6 support
+^^^^^^^^^^^^^^^^^^^^^
+
+``ixfrdist`` now binds listening sockets with `IPV6_V6ONLY set`, which means that ``[::]`` no longer accepts IPv4 connections.
+If you want to listen on both IPv4 and IPv6, you need to add a line with ``0.0.0.0`` to the ``listen`` section of your ixfrdist configuration.
+
 4.8.0 to 4.9.0
 --------------
 
index 0f845f1ce50b68052261237df79a50b3c409ae6a..9cebccded5faf871172180b5cfb3023410c73744 100644 (file)
@@ -1621,6 +1621,11 @@ static std::optional<IXFRDistConfiguration> parseConfiguration(int argc, char**
           int s = SSocket(addr.sin4.sin_family, stype, 0);
           setNonBlocking(s);
           setReuseAddr(s);
+          if (addr.isIPv6()) {
+            int one = 1;
+            (void)setsockopt(s, IPPROTO_IPV6, IPV6_V6ONLY, &one, sizeof(one));
+          }
+
           SBind(s, addr);
           if (stype == SOCK_STREAM) {
             SListen(s, 30); // TODO make this configurable