diff options
| author | Bjoern A. Zeeb <bz@FreeBSD.org> | 2020-01-08 23:30:26 +0000 |
|---|---|---|
| committer | Bjoern A. Zeeb <bz@FreeBSD.org> | 2020-01-08 23:30:26 +0000 |
| commit | 334fc5822becf3294a389630137d2332e42fda7d (patch) | |
| tree | 64d9be50a60c4aaa2f49cdfd2bb1d22823703fc2 /sys/netinet/tcp_timer.c | |
| parent | e371a9e6cc30e63a240619e1e07c06b5f7305062 (diff) | |
Notes
Diffstat (limited to 'sys/netinet/tcp_timer.c')
| -rw-r--r-- | sys/netinet/tcp_timer.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/sys/netinet/tcp_timer.c b/sys/netinet/tcp_timer.c index 5c1c658b7d1d..195a5e775ad5 100644 --- a/sys/netinet/tcp_timer.c +++ b/sys/netinet/tcp_timer.c @@ -125,9 +125,10 @@ SYSCTL_PROC(_net_inet_tcp, OID_AUTO, rexmit_slop, CTLTYPE_INT|CTLFLAG_RW, &tcp_rexmit_slop, 0, sysctl_msec_to_ticks, "I", "Retransmission Timer Slop"); -int tcp_always_keepalive = 1; -SYSCTL_INT(_net_inet_tcp, OID_AUTO, always_keepalive, CTLFLAG_RW, - &tcp_always_keepalive , 0, "Assume SO_KEEPALIVE on all TCP connections"); +VNET_DEFINE(int, tcp_always_keepalive) = 1; +SYSCTL_INT(_net_inet_tcp, OID_AUTO, always_keepalive, CTLFLAG_VNET|CTLFLAG_RW, + &VNET_NAME(tcp_always_keepalive) , 0, + "Assume SO_KEEPALIVE on all TCP connections"); int tcp_fast_finwait2_recycle = 0; SYSCTL_INT(_net_inet_tcp, OID_AUTO, fast_finwait2_recycle, CTLFLAG_RW, @@ -431,7 +432,7 @@ tcp_timer_keep(void *xtp) TCPSTAT_INC(tcps_keeptimeo); if (tp->t_state < TCPS_ESTABLISHED) goto dropit; - if ((tcp_always_keepalive || + if ((V_tcp_always_keepalive || inp->inp_socket->so_options & SO_KEEPALIVE) && tp->t_state <= TCPS_CLOSING) { if (ticks - tp->t_rcvtime >= TP_KEEPIDLE(tp) + TP_MAXIDLE(tp)) |
