Fix: Use SOL_SOCKET level for SO_KEEPALIVE on all platform
authorJonathan Rajotte <jonathan.rajotte-julien@efficios.com>
Wed, 21 Feb 2018 21:59:54 +0000 (16:59 -0500)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Mon, 26 Feb 2018 22:48:37 +0000 (17:48 -0500)
commit627e69536f1f82c12abae866bf647237a415f910
tree443365a00a9afbc1d9ada6d839bdfe7ca668ab88
parent68c7f6e55254fd6e54d7bb4a6c1316bb77843a6e
Fix: Use SOL_SOCKET level for SO_KEEPALIVE on all platform

On Linux, COMPAT_SOCKET_LEVEL was set to SOL_TCP instead
of SOL_SOCKET, this resulted in execution of:
    setsockopt(..., SOL_TCP, TCP_DEFER_ACCEPT, ...)

Instead of:
    setsockopt(..., SOL_SOCKET, SO_KEEPALIVE, ...)

Hence, TCP keep alive was not enabled.

COMPAT_SOCKET_LEVEL is not needed. All platforms supported use the
SOL_SOCKET level for SO_KEEPALIVE.

Signed-off-by: Jonathan Rajotte <jonathan.rajotte-julien@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
src/bin/lttng-relayd/tcp_keep_alive.c
This page took 0.024977 seconds and 4 git commands to generate.