kernel - Change tcp keepalive options from ms to seconds (DISRUPTIVE) (2)
commit106a7748a4ca8d9eda364d2b0102d11d9e0b6368
authorMatthew Dillon <dillon@apollo.backplane.com>
Wed, 26 Jun 2019 04:48:20 +0000 (25 21:48 -0700)
committerMatthew Dillon <dillon@apollo.backplane.com>
Wed, 26 Jun 2019 04:55:10 +0000 (25 21:55 -0700)
treee9e8430950b7fe3fa130f175257f8e4421cee0b0
parent5b1ee8063a575f9bec027387674748800ffdc534
kernel - Change tcp keepalive options from ms to seconds (DISRUPTIVE) (2)

* Refactor the code slightly to adopt the same limits and behavior
  as linux.  Instead of capping out we return EINVAL on any out-of-
  bound value.

* Also note that my history was wrong.  Sephe actually implemented
  these options, not me, and it was in 2011 (8 years ago, not 15+).
  So much for my vague memory!  At the time other operating systems
  used wildly different metrics, and we chose to use milliseconds.
  But in the intervening years it looks like the main systems have
  adopted a 1-second interval.

  In changing our parameters to match, we avoid a lot of pain when
  porting third party applications that use it, particularly chrome.
  But also a few others.

  If we need sub-second parameters in the future we will implement
  new option keywords for it.
sys/netinet/tcp_usrreq.c