summaryrefslogtreecommitdiff
path: root/lib/util
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2011-12-15 16:12:37 +0100
committerVolker Lendecke <vl@samba.org>2011-12-16 07:34:48 +0100
commitbcd3db6264fbe4d2e71c0844a46b885e3c542e2a (patch)
tree57ca24af5d6556bfa2f31b5c1e625656d127e27e /lib/util
parent432ea5f5c627b374948d0881d5da2aa9ba700763 (diff)
downloadsamba-bcd3db6264fbe4d2e71c0844a46b885e3c542e2a.tar.gz
samba-bcd3db6264fbe4d2e71c0844a46b885e3c542e2a.tar.bz2
samba-bcd3db6264fbe4d2e71c0844a46b885e3c542e2a.zip
Add support for TCP_DEFER_ACCEPT
"man tcp" on Linux says: TCP_DEFER_ACCEPT Allows a listener to be awakened only when data arrives on the socket. Takes an integer value (seconds), this can bound the maximum number of attempts TCP will make to complete the connection. This option should not be used in code intended to be portable. This might reduce the 139/445 forks a bit on high-load servers
Diffstat (limited to 'lib/util')
-rw-r--r--lib/util/util_net.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/util/util_net.c b/lib/util/util_net.c
index 1f6ecdd87b..637c52b988 100644
--- a/lib/util/util_net.c
+++ b/lib/util/util_net.c
@@ -812,6 +812,9 @@ static const smb_socket_option socket_options[] = {
#ifdef TCP_KEEPALIVE_ABORT_THRESHOLD
{"TCP_KEEPALIVE_ABORT_THRESHOLD", IPPROTO_TCP, TCP_KEEPALIVE_ABORT_THRESHOLD, 0, OPT_INT},
#endif
+#ifdef TCP_DEFER_ACCEPT
+ {"TCP_DEFER_ACCEPT", IPPROTO_TCP, TCP_DEFER_ACCEPT, 0, OPT_INT},
+#endif
{NULL,0,0,0,0}};
/****************************************************************************