From: Günther Deschner Date: Wed, 20 Sep 2017 18:21:49 +0000 (+0200) Subject: lib/util: allow to set TCP_USER_TIMEOUT socket option X-Git-Tag: samba-4.13.0rc1~50 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bd71d2d92c2186bc503449085e53fcb7564cbb42;p=thirdparty%2Fsamba.git lib/util: allow to set TCP_USER_TIMEOUT socket option BUG: https://bugzilla.samba.org/show_bug.cgi?id=11897 Signed-off-by: Guenther Deschner Reviewed-by: Stefan Metzmacher --- diff --git a/docs-xml/smbdotconf/tuning/socketoptions.xml b/docs-xml/smbdotconf/tuning/socketoptions.xml index c0bd785cb78..d2be5148fde 100644 --- a/docs-xml/smbdotconf/tuning/socketoptions.xml +++ b/docs-xml/smbdotconf/tuning/socketoptions.xml @@ -71,6 +71,7 @@ TCP_KEEPALIVE_THRESHOLD * TCP_KEEPALIVE_ABORT_THRESHOLD * TCP_DEFER_ACCEPT * + TCP_USER_TIMEOUT * Those marked with a '*' take an integer diff --git a/lib/util/util_net.c b/lib/util/util_net.c index 6cfb35c87a4..ad6ee792084 100644 --- a/lib/util/util_net.c +++ b/lib/util/util_net.c @@ -1035,6 +1035,9 @@ static const smb_socket_option socket_options[] = { #endif #ifdef TCP_DEFER_ACCEPT {"TCP_DEFER_ACCEPT", IPPROTO_TCP, TCP_DEFER_ACCEPT, 0, OPT_INT}, +#endif +#ifdef TCP_USER_TIMEOUT + {"TCP_USER_TIMEOUT", IPPROTO_TCP, TCP_USER_TIMEOUT, 0, OPT_INT}, #endif {NULL,0,0,0,0}};