You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Expectation: setting SO_KEEPALIVE to 0 on socket turns off keepalive logic.
Reality: setting SO_KEEPALIVE to 0 on socket zeroes out userspace keepalive variables but does not zero out kernel keepalive timer. When time of next keepalive packet comes, no "is keepalive enabled" check is performed.
state->p.tcp.keepalive.probes is zero so tcp->keepalive.probe_cnt < state->p.tcp.keepalive.probes check is never passed. As a result, keepalive is not turned off; on the contrary, socket is invariably closed with ETIMEDOUT when timer goes to zero.
if (tcp->keepalive.timer == 0 && state->p.tcp.keepalive.probes);
but I'm not sure if that's the best way to do so.
The text was updated successfully, but these errors were encountered:
vient
changed the title
Turning off TCP keepalive does not work for bypassed sockets
Turning off TCP keepalive does not work on bypassed sockets
Oct 12, 2021
vient
changed the title
Turning off TCP keepalive does not work on bypassed sockets
Turning off TCP keepalive does not work on bypassed sockets when no activity is performed
Oct 13, 2021
Expectation: setting SO_KEEPALIVE to 0 on socket turns off keepalive logic.
Reality: setting SO_KEEPALIVE to 0 on socket zeroes out userspace keepalive variables but does not zero out kernel keepalive timer. When time of next keepalive packet comes, no "is keepalive enabled" check is performed.
https://github.com/exablaze-oss/exanic-software/blob/404da33717db8029557eb884fb1285f7c43bc75e/modules/exasock/exasock-tcp.c#L2966-L2989
state->p.tcp.keepalive.probes
is zero sotcp->keepalive.probe_cnt < state->p.tcp.keepalive.probes
check is never passed. As a result, keepalive is not turned off; on the contrary, socket is invariably closed with ETIMEDOUT when timer goes to zero.I fixed it for myself by changing line
https://github.com/exablaze-oss/exanic-software/blob/404da33717db8029557eb884fb1285f7c43bc75e/modules/exasock/exasock-tcp.c#L2970
to
but I'm not sure if that's the best way to do so.
The text was updated successfully, but these errors were encountered: