From 38ed47e3db420ccce886f582c50ce5163e0bdb1c Mon Sep 17 00:00:00 2001 From: yasuoka Date: Thu, 8 Dec 2022 05:59:39 +0000 Subject: [PATCH] Convert tcptv_keep_init in milliseconds before comparing other values of tcp time. This fixes the retransmit timer of syn_cache which was broken. reported by naddy, input dlg, test jca ok jca --- sys/netinet/tcp_input.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/netinet/tcp_input.c b/sys/netinet/tcp_input.c index 9941613d3b3..f2385162001 100644 --- a/sys/netinet/tcp_input.c +++ b/sys/netinet/tcp_input.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tcp_input.c,v 1.382 2022/11/07 11:22:55 yasuoka Exp $ */ +/* $OpenBSD: tcp_input.c,v 1.383 2022/12/08 05:59:39 yasuoka Exp $ */ /* $NetBSD: tcp_input.c,v 1.23 1996/02/13 23:43:44 christos Exp $ */ /* @@ -3352,7 +3352,7 @@ syn_cache_timer(void *arg) * than the keep alive timer would allow, expire it. */ sc->sc_rxttot += sc->sc_rxtcur; - if (sc->sc_rxttot >= tcptv_keep_init) + if (sc->sc_rxttot >= TCP_TIME(tcptv_keep_init)) goto dropit; tcpstat_inc(tcps_sc_retransmitted); -- 2.20.1