diff options
author | Harald Welte <laforge@osmocom.org> | 2024-02-24 06:51:04 +0100 |
---|---|---|
committer | Vadim Yanitskiy <vyanitskiy@sysmocom.de> | 2024-03-15 00:30:22 +0700 |
commit | 0eed4b7caec1726c4facb6b2a795e73c220f4ef2 (patch) | |
tree | 0e574bcd254ea6ac90f3416eed053fa0869e258b /src/Makefile.am | |
parent | a33f72e55331dd9e9be4fb7241183faf6d90e281 (diff) |
Fix critical bug in default TCP keepalive user timeout
It turns out that our calculation of the TCP_USER_TIMEOUT value was
flawed in several ways:
* there should have been parenthesis around the + operator
(line->keepalive_probe_interval + line->keepalive_idle_timeout) as the
keepalive_idle_timeout is in seconds, not milli-seconds.
* in the default case, all those values are configured to -1
(E1INP_USE_DEFAULT). This means we're using
1000 * -1 * -1 + -1 = 999
i.e. just below a second which clearly is not enough for a lossy
satellite or wifi back-haul.
This fixes a regression introduced in Ia7659c209aea0d26eb37d31e771adc91b17ae668
(libosmo-abis >= 1.4.0) when TCP keepalive user timeouts became enabled
by default.
The initial support for TCP_USER_TIMEOUT was merged in
I5e7425958472aa5d758e09bfbefc7d7d37bf6f5f (libosmo-abis >= 0.7.0) but
since TCP keepalives were not yet enabled by default, only users with
explicit TCP keepalive configuration in their config files would be
affected - and then only of the second part of the bug (operator
precedence).
In addition, let's print the actually-used values to the log, helping to
spot unintended values.
Change-Id: Idca24d3e676a45d860d9eec60dc2097d8d87f3bf
Related: OS#5785, OS#6375, SYS#6801
Fixes: Ia7659c209aea0d26eb37d31e771adc91b17ae668
(cherry picked from commit 12fae9aeebd86e242abd5c682a12fd1c9da68497)
Diffstat (limited to 'src/Makefile.am')
0 files changed, 0 insertions, 0 deletions