Bug 214913 - SO_KEEPALIVE does not work?
Summary: SO_KEEPALIVE does not work?
Status: New
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: 9.2-RELEASE
Hardware: amd64 Any
: --- Affects Many People
Assignee: freebsd-net (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-11-28 20:24 UTC by Victor Porton
Modified: 2016-11-29 10:56 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Victor Porton 2016-11-28 20:24:35 UTC
See http://bugs.python.org/issue28825
Comment 1 Andrey V. Elsukov freebsd_committer freebsd_triage 2016-11-29 10:56:18 UTC
SO_KEEPALIVE option doesn't mean that your connection will live forever. It only enables keepalive probes. These probes are carried out to determine that your connection is still alive. Note, not for keeping it alive.

In FreeBSD by default net.inet.tcp.always_keepalive variable configured to assume SO_KEEPALIVE on all TCP connections. But first keepalive probe will be made only after 2 hours of idle state. This is controlled by net.inet.tcp.keepidle variable.

Just have tested keepalive probes with lowered idle time to 65 seconds on FreeBSD 12.0. All works as expected.