From: Remi Gacogne Date: Fri, 19 Nov 2021 14:07:31 +0000 (+0100) Subject: dnsdist: Keep the system default values for `SO_RCVBUF` and `SO_SNDBUF` X-Git-Tag: dnsdist-1.7.0-beta2~14^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c633c7d9ad2c27d66b9427e8f146468e94cf276a;p=thirdparty%2Fpdns.git dnsdist: Keep the system default values for `SO_RCVBUF` and `SO_SNDBUF` --- diff --git a/pdns/dnsdist.cc b/pdns/dnsdist.cc index e679d64b48..4a18e7e7ad 100644 --- a/pdns/dnsdist.cc +++ b/pdns/dnsdist.cc @@ -141,8 +141,8 @@ bool g_servFailOnNoPolicy{false}; bool g_truncateTC{false}; bool g_fixupCase{false}; bool g_dropEmptyQueries{false}; -uint32_t g_socketUDPSendBuffer{16777216}; -uint32_t g_socketUDPRecvBuffer{16777216}; +uint32_t g_socketUDPSendBuffer{0}; +uint32_t g_socketUDPRecvBuffer{0}; std::set g_capabilitiesToRetain; diff --git a/pdns/dnsdistdist/docs/reference/tuning.rst b/pdns/dnsdistdist/docs/reference/tuning.rst index da70e97049..741540a398 100644 --- a/pdns/dnsdistdist/docs/reference/tuning.rst +++ b/pdns/dnsdistdist/docs/reference/tuning.rst @@ -164,10 +164,12 @@ Tuning related functions .. versionadded:: 1.7.0 - Set the size of the receive (SO_RCVBUF) and send (SO_SNDBUF) buffers for incoming UDP sockets. + Set the size of the receive (``SO_RCVBUF``) and send (``SO_SNDBUF``) buffers for incoming UDP sockets. On Linux the default + values correspond to ``net.core.rmem_default`` and ``net.core.wmem_default`` , and the maximum values are restricted + by ``net.core.rmem_max`` and ``net.core.wmem_max``. - :param int recv: SO_RCVBUF value. Default is 16777216. 0 means the system value will be kept. - :param int send: SO_SNDBUF value. Default is 16777216. 0 means the system value will be kept. + :param int recv: ``SO_RCVBUF`` value. Default is 0, meaning the system value will be kept. + :param int send: ``SO_SNDBUF`` value. Default is 0, meaning the system value will be kept. .. function:: setUDPTimeout(num)