]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
dnsdist: Keep the system default values for `SO_RCVBUF` and `SO_SNDBUF`
authorRemi Gacogne <remi.gacogne@powerdns.com>
Fri, 19 Nov 2021 14:07:31 +0000 (15:07 +0100)
committerRemi Gacogne <remi.gacogne@powerdns.com>
Fri, 19 Nov 2021 14:07:31 +0000 (15:07 +0100)
pdns/dnsdist.cc
pdns/dnsdistdist/docs/reference/tuning.rst

index e679d64b481e7c0fe15dd4748afbf8b9a23a42e7..4a18e7e7ad0b1129e0a48c0e1e6b6c106632b844 100644 (file)
@@ -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<std::string> g_capabilitiesToRetain;
 
index da70e97049af19be8ec9e2caf31cb215eeffc6f0..741540a39812cee93b3e37ca068e01101b861b44 100644 (file)
@@ -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)