From: Peter van Dijk Date: Mon, 19 Oct 2020 13:14:43 +0000 (+0200) Subject: Revert "auth: remove local-ipv6, query-local-address6" X-Git-Tag: auth-4.4.0-alpha2~26^2~2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=24c4f34f31b5536cea7616056af7aca3a6ac0156;p=thirdparty%2Fpdns.git Revert "auth: remove local-ipv6, query-local-address6" This reverts commit c71c6ea62eb67aa7580dfadee981607559d1247c. --- diff --git a/docs/settings.rst b/docs/settings.rst index a29c7d6ae8..8b51211258 100644 --- a/docs/settings.rst +++ b/docs/settings.rst @@ -1309,7 +1309,8 @@ the network). ``query-local-address6`` ------------------------ .. deprecated:: 4.4.0 - Removed. Use :ref:`setting-query-local-address`. + Use :ref:`setting-query-local-address`. The default has been changed + from '::' to unset. - IPv6 Address - Default: unset diff --git a/pdns/common_startup.cc b/pdns/common_startup.cc index 8807c10c61..05b0cca571 100644 --- a/pdns/common_startup.cc +++ b/pdns/common_startup.cc @@ -97,10 +97,12 @@ void declareArguments() ::arg().setSwitch("log-dns-details","If PDNS should log DNS non-erroneous details")="no"; ::arg().setSwitch("log-dns-queries","If PDNS should log all incoming DNS queries")="no"; ::arg().set("local-address","Local IP addresses to which we bind")="0.0.0.0, ::"; + ::arg().set("local-ipv6","DEPRECATED, will be removed, move your IPs to local-address")=""; ::arg().setSwitch("local-address-nonexist-fail","Fail to start if one or more of the local-address's do not exist on this server")="yes"; ::arg().setSwitch("non-local-bind", "Enable binding to non-local addresses by using FREEBIND / BINDANY socket options")="no"; ::arg().setSwitch("reuseport","Enable higher performance on compliant kernels by using SO_REUSEPORT allowing each receiver thread to open its own socket")="no"; ::arg().set("query-local-address","Source IP addresses for sending queries")="0.0.0.0 ::"; + ::arg().set("query-local-address6","DEPRECATED: Use query-local-address. Source IPv6 address for sending queries")=""; ::arg().set("overload-queue-length","Maximum queuelength moving to packetcache only")="0"; ::arg().set("max-queue-length","Maximum queuelength before considering situation lost")="5000"; @@ -632,6 +634,10 @@ void mainthread() } pdns::parseQueryLocalAddress(::arg()["query-local-address"]); + if (!::arg()["query-local-address6"].empty()) { + g_log<go(); diff --git a/pdns/nameserver.cc b/pdns/nameserver.cc index 57ee709442..6d658155a3 100644 --- a/pdns/nameserver.cc +++ b/pdns/nameserver.cc @@ -89,6 +89,10 @@ vector g_localaddresses; // not static, our unit tests need to pok void UDPNameserver::bindAddresses() { vectorlocals; + stringtok(locals,::arg()["local-ipv6"]," ,"); + if (!locals.empty()) { + g_log<locals; + stringtok(locals,::arg()["local-ipv6"]," ,"); stringtok(locals,::arg()["local-address"]," ,"); if(locals.empty()) throw PDNSException("No local addresses specified");