-/* $OpenBSD: tcp_input.c,v 1.394 2023/11/27 20:37:15 bluhm Exp $ */
+/* $OpenBSD: tcp_input.c,v 1.395 2023/11/29 19:19:25 bluhm Exp $ */
/* $NetBSD: tcp_input.c,v 1.23 1996/02/13 23:43:44 christos Exp $ */
/*
* 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 >= READ_ONCE(tcptv_keep_init))
goto dropit;
/* Advance the timer back-off. */
return (-1);
}
refcnt_init_trace(&sc->sc_refcnt, DT_REFCNT_IDX_SYNCACHE);
- timeout_set_proc(&sc->sc_timer, syn_cache_timer, sc);
+ timeout_set_flags(&sc->sc_timer, syn_cache_timer, sc,
+ KCLOCK_NONE, TIMEOUT_PROC | TIMEOUT_MPSAFE);
/*
* Fill in the cache, and put the necessary IP and TCP
-/* $OpenBSD: tcp_var.h,v 1.172 2023/11/16 18:27:48 bluhm Exp $ */
+/* $OpenBSD: tcp_var.h,v 1.173 2023/11/29 19:19:25 bluhm Exp $ */
/* $NetBSD: tcp_var.h,v 1.17 1996/02/13 23:44:24 christos Exp $ */
/*
extern struct pool tcpcb_pool;
extern struct inpcbtable tcbtable; /* head of queue of active tcpcb's */
extern int tcp_do_rfc1323; /* enabled/disabled? */
-extern int tcptv_keep_init; /* time to keep alive the initial SYN packet */
+extern int tcptv_keep_init; /* [N] time to keep alive initial SYN packet */
extern int tcp_mssdflt; /* default maximum segment size */
extern int tcp_rst_ppslim; /* maximum outgoing RST packet per second */
extern int tcp_ack_on_push; /* ACK immediately on PUSH */