]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
dnsdist: Really disable REUSEADDR on outgoing UDP client sockets 12819/head
authorRemi Gacogne <remi.gacogne@powerdns.com>
Mon, 15 May 2023 13:32:27 +0000 (15:32 +0200)
committerRemi Gacogne <remi.gacogne@powerdns.com>
Mon, 15 May 2023 13:32:27 +0000 (15:32 +0200)
It turns out that our `Socket::bind()` will _helpfully_ enable this
by default.

pdns/dnsdistdist/dnsdist-healthchecks.cc

index 9ec50e3a5a176d425976f04e104e2862e89027df..213374020f1552e74b69947c9afe31ec22b0e617 100644 (file)
@@ -327,7 +327,7 @@ bool queueHealthCheck(std::unique_ptr<FDMultiplexer>& mplexer, const std::shared
         SSetsockopt(sock.getHandle(), SOL_IP, IP_BIND_ADDRESS_NO_PORT, 1);
       }
 #endif
-      sock.bind(ds->d_config.sourceAddr);
+      sock.bind(ds->d_config.sourceAddr, false);
     }
 
     auto data = std::make_shared<HealthCheckData>(*mplexer, ds, std::move(checkName), checkType, checkClass, queryID);