From: Remi Gacogne Date: Fri, 14 Jun 2019 08:16:57 +0000 (+0200) Subject: Merge pull request #7860 from pieterlexis/dnsdist-rm-disable-tcp X-Git-Tag: dnsdist-1.4.0-rc1~129 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=195c7338dcd77a283d61744c63f13c44a10bdacf;p=thirdparty%2Fpdns.git Merge pull request #7860 from pieterlexis/dnsdist-rm-disable-tcp dnsdist: disallow TCP disablement --- 195c7338dcd77a283d61744c63f13c44a10bdacf diff --cc pdns/dnsdist-lua.cc index bf235d5572,3db0e822fc..aab963cf66 --- a/pdns/dnsdist-lua.cc +++ b/pdns/dnsdist-lua.cc @@@ -536,13 -529,10 +529,11 @@@ void setupLuaConfig(bool client ComboAddress loc(addr, 53); // only works pre-startup, so no sync necessary g_frontends.push_back(std::unique_ptr(new ClientState(loc, false, reusePort, tcpFastOpenQueueSize, interface, cpus))); - if (doTCP) { - g_frontends.push_back(std::unique_ptr(new ClientState(loc, true, reusePort, tcpFastOpenQueueSize, interface, cpus))); - } + g_frontends.push_back(std::unique_ptr(new ClientState(loc, true, reusePort, tcpFastOpenQueueSize, interface, cpus))); } catch(std::exception& e) { - g_outputBuffer="Error: "+string(e.what())+"\n"; + g_outputBuffer="Error: "+string(e.what())+"\n"; + errlog("Error while trying to listen on %s: %s\n", addr, string(e.what())); } }); diff --cc pdns/dnsdistdist/docs/reference/config.rst index 5f62a7b74e,bd94c1a922..00b2293f8f --- a/pdns/dnsdistdist/docs/reference/config.rst +++ b/pdns/dnsdistdist/docs/reference/config.rst @@@ -74,9 -77,9 +77,9 @@@ Listen Socket Options: - * ``doTCP=true``: bool - Also bind on TCP on ``address``. + * ``doTCP=true``: bool - Also bind on TCP on ``address``. Removed in 1.4.0. * ``reusePort=false``: bool - Set the ``SO_REUSEPORT`` socket option. - * ``tcpFastOpenSize=0``: int - Set the TCP Fast Open queue size, enabling TCP Fast Open when available and the value is larger than 0. + * ``tcpFastOpenQueueSize=0``: int - Set the TCP Fast Open queue size, enabling TCP Fast Open when available and the value is larger than 0. * ``interface=""``: str - Set the network interface to use. * ``cpus={}``: table - Set the CPU affinity for this listener thread, asking the scheduler to run it on a single CPU id, or a set of CPU ids. This parameter is only available if the OS provides the pthread_setaffinity_np() function. diff --cc pdns/dnsdistdist/docs/reference/dnscrypt.rst index e5a04371b3,68a7703b9d..d25c6cfce8 --- a/pdns/dnsdistdist/docs/reference/dnscrypt.rst +++ b/pdns/dnsdistdist/docs/reference/dnscrypt.rst @@@ -16,9 -19,9 +19,9 @@@ DNSCrypt objects and function Options: - * ``doTCP=true``: bool - Also bind on TCP on ``address``. + * ``doTCP=true``: bool - Also bind on TCP on ``address``, removed in 1.4.0. * ``reusePort=false``: bool - Set the ``SO_REUSEPORT`` socket option. - * ``tcpFastOpenSize=0``: int - Set the TCP Fast Open queue size, enabling TCP Fast Open when available and the value is larger than 0 + * ``tcpFastOpenQueueSize=0``: int - Set the TCP Fast Open queue size, enabling TCP Fast Open when available and the value is larger than 0 * ``interface=""``: str - Sets the network interface to use * ``cpus={}``: table - Set the CPU affinity for this listener thread, asking the scheduler to run it on a single CPU id, or a set of CPU ids. This parameter is only available if the OS provides the pthread_setaffinity_np() function.