Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
openldap
OpenLDAP
Commits
94ee1123
Commit
94ee1123
authored
Mar 16, 2021
by
Ondřej Kuzník
Committed by
Quanah Gibson-Mount
Apr 30, 2021
Browse files
ITS
#9502
TCP_USER_TIMEOUT for lloadd
parent
91dd4240
Changes
3
Hide whitespace changes
Inline
Side-by-side
doc/man/man5/lloadd.conf.5
View file @
94ee1123
...
...
@@ -598,6 +598,7 @@ option. The authentication configuration is shared between them.
.B [secprops=<properties>]
.B [timeout=<seconds>]
.B [network\-timeout=<seconds>]
.B [tcp\-user\-timeout=<milliseconds>]
Specifies the bind credentials
.B lloadd
...
...
@@ -656,6 +657,14 @@ Bind request to complete.
Timeout set to 0 means no timeout is in effect and by default, no timeouts are
in effect.
The
.B tcp\-user\-timeout
parameter, if non-zero, corresponds to the
.B TCP_USER_TIMEOUT
set on the upstream connections, overriding the operating system setting.
Only some systems support the customization of this parameter, it is
ignored otherwise and system-wide settings are used.
.SH BACKEND OPTIONS
.TP
...
...
@@ -830,6 +839,7 @@ default lloadd configuration file
.BR ldap (3),
.BR gnutls\-cli (1),
.BR slapd.conf (5),
.BR tcp (7),
.BR lloadd (8),
.BR slapd (8).
.LP
...
...
servers/lloadd/backend.c
View file @
94ee1123
...
...
@@ -192,6 +192,22 @@ upstream_name_cb( int result, struct evutil_addrinfo *res, void *arg )
#endif
/* TCP_KEEPINTVL */
}
#endif
/* SO_KEEPALIVE */
if
(
bindconf
.
sb_tcp_user_timeout
>
0
)
{
#ifdef TCP_USER_TIMEOUT
if
(
setsockopt
(
s
,
IPPROTO_TCP
,
TCP_USER_TIMEOUT
,
(
void
*
)
&
bindconf
.
sb_tcp_user_timeout
,
sizeof
(
bindconf
.
sb_tcp_user_timeout
)
)
==
AC_SOCKET_ERROR
)
{
Debug
(
LDAP_DEBUG_TRACE
,
"upstream_name_cb: "
"setsockopt(%d, TCP_USER_TIMEOUT) failed (ignored).
\n
"
,
s
);
}
#else
Debug
(
LDAP_DEBUG_TRACE
,
"upstream_name_cb: "
"sockopt TCP_USER_TIMEOUT not supported on this "
"system.
\n
"
);
#endif
/* TCP_USER_TIMEOUT */
}
#ifdef TCP_NODELAY
if
(
setsockopt
(
s
,
IPPROTO_TCP
,
TCP_NODELAY
,
(
char
*
)
&
dummy
,
sizeof
(
dummy
)
)
==
AC_SOCKET_ERROR
)
{
...
...
servers/lloadd/config.c
View file @
94ee1123
...
...
@@ -2774,10 +2774,11 @@ static slap_cf_aux_table bindkey[] = {
{
BER_BVC
(
"authcID="
),
offsetof
(
slap_bindconf
,
sb_authcId
),
'b'
,
1
,
NULL
},
{
BER_BVC
(
"authzID="
),
offsetof
(
slap_bindconf
,
sb_authzId
),
'b'
,
1
,
NULL
},
{
BER_BVC
(
"keepalive="
),
offsetof
(
slap_bindconf
,
sb_keepalive
),
'x'
,
0
,
(
slap_verbmasks
*
)
lload_keepalive_parse
},
{
BER_BVC
(
"tcp-user-timeout="
),
offsetof
(
slap_bindconf
,
sb_tcp_user_timeout
),
'u'
,
0
,
NULL
},
#ifdef HAVE_TLS
/* NOTE: replace "1
1
" with the actual index
/* NOTE: replace "1
2
" with the actual index
* of the first TLS-related line */
#define aux_TLS (bindkey+1
1
)
/* beginning of TLS keywords */
#define aux_TLS (bindkey+1
2
)
/* beginning of TLS keywords */
{
BER_BVC
(
"tls_cert="
),
offsetof
(
slap_bindconf
,
sb_tls_cert
),
's'
,
1
,
NULL
},
{
BER_BVC
(
"tls_key="
),
offsetof
(
slap_bindconf
,
sb_tls_key
),
's'
,
1
,
NULL
},
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment