From e326f7850882aeb8a92b51c9a43f49207de86016 Mon Sep 17 00:00:00 2001 From: Peter van Dijk Date: Mon, 27 Jan 2020 21:21:43 +0100 Subject: [PATCH] allow local-ipv6 until 4.4.0 --- docs/settings.rst | 10 +++++----- docs/upgrading.rst | 2 +- pdns/common_startup.cc | 1 + pdns/nameserver.cc | 5 +++++ pdns/tcpreceiver.cc | 1 + 5 files changed, 13 insertions(+), 6 deletions(-) diff --git a/docs/settings.rst b/docs/settings.rst index 275ccca4b1..01180b577b 100644 --- a/docs/settings.rst +++ b/docs/settings.rst @@ -751,7 +751,7 @@ available in non-static distributions. Before 4.3.0, this setting only supported IPv4. - IPv4 Addresses, separated by commas or whitespace -- Default: 0.0.0.0, ``::`` +- Default: ``0.0.0.0, ::`` Local IP addresses to which we bind. It is highly advised to bind to specific interfaces and not use the default 'bind to any'. This causes @@ -774,14 +774,14 @@ Fail to start if one or more of the ``local-ipv6`` -------------- -.. versionchanged:: 4.3.0 +.. versionchanged:: 4.4.0 removed, use :ref:`setting-local-address` .. deprecated:: 4.3.0 - This setting has been removed, use :ref:`setting-localaddress` + This setting has been deprecated, use :ref:`setting-local-address` - IPv6 Addresses, separated by commas or whitespace -- Default: '::' +- Default: ``::`` Local IPv6 address to which we bind. It is highly advised to bind to specific interfaces and not use the default 'bind to any'. This causes @@ -792,7 +792,7 @@ big problems if you have multiple IP addresses. ``local-ipv6-nonexist-fail`` ---------------------------- -.. deprecated:: 4.3.0 +.. versionchanged:: 4.3.0 This setting has been removed, use :ref:`setting-localaddress-nonexist-fail` - Boolean diff --git a/docs/upgrading.rst b/docs/upgrading.rst index 03358718f2..35ebbc3dad 100644 --- a/docs/upgrading.rst +++ b/docs/upgrading.rst @@ -50,7 +50,7 @@ New settings Removed settings ^^^^^^^^^^^^^^^^ -- :ref:`setting-local-ipv6` has been removed. IPv4 and IPv6 listen addresses can now be set with :ref:`setting-local-address`. The default for the latter has been changed to ``0.0.0.0, ::``. +- :ref:`setting-local-ipv6` has been deprecated, and will be removed in 4.4.0. IPv4 and IPv6 listen addresses can now be set with :ref:`setting-local-address`. The default for the latter has been changed to ``0.0.0.0, ::``. 4.1.X to 4.2.0 diff --git a/pdns/common_startup.cc b/pdns/common_startup.cc index 597a238ea3..beaec8126b 100644 --- a/pdns/common_startup.cc +++ b/pdns/common_startup.cc @@ -87,6 +87,7 @@ 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"; diff --git a/pdns/nameserver.cc b/pdns/nameserver.cc index 427089702e..2a8b3a5bfb 100644 --- a/pdns/nameserver.cc +++ b/pdns/nameserver.cc @@ -89,7 +89,12 @@ 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"); -- 2.47.2