summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorClaudio Jeker <claudio@cvs.openbsd.org>2022-12-13 18:10:56 +0000
committerClaudio Jeker <claudio@cvs.openbsd.org>2022-12-13 18:10:56 +0000
commitca46522f5c5ea5d1dd79fd877aeaac7d97a38682 (patch)
treec6a74a786bf7c43019fb79084232526881768f6c /sys
parent8fda787441e114b3f331fda79e94278fa88a345e (diff)
In tcp_now() switch from getnsecuptime() to getnsecruntime()
The tcp timer is not supposed to run during suspend but getnsecuptime() does and because of this sessions with TCP_KEEPALIVE on reset after a few hours of sleep. Problem noticed by mlarkin@, investigation by yasuoka@ additional testing jca@ OK yasuoka@ jca@ cheloha@
Diffstat (limited to 'sys')
-rw-r--r--sys/netinet/tcp_var.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/netinet/tcp_var.h b/sys/netinet/tcp_var.h
index eb5023052f9..e4931ab441d 100644
--- a/sys/netinet/tcp_var.h
+++ b/sys/netinet/tcp_var.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: tcp_var.h,v 1.161 2022/11/07 11:22:55 yasuoka Exp $ */
+/* $OpenBSD: tcp_var.h,v 1.162 2022/12/13 18:10:55 claudio Exp $ */
/* $NetBSD: tcp_var.h,v 1.17 1996/02/13 23:44:24 christos Exp $ */
/*
@@ -641,7 +641,7 @@ tcpstat_pkt(enum tcpstat_counters pcounter, enum tcpstat_counters bcounter,
static inline uint32_t
tcp_now(void)
{
- return (getnsecuptime() / 1000000);
+ return (getnsecruntime() / 1000000);
}
#define TCP_TIME_MSEC(_ms) (_ms) /* tcp_now() is in milliseconds */