summaryrefslogtreecommitdiffstats
path: root/sys/netinet/tcp_timer.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/netinet/tcp_timer.c')
-rw-r--r--sys/netinet/tcp_timer.c27
1 files changed, 27 insertions, 0 deletions
diff --git a/sys/netinet/tcp_timer.c b/sys/netinet/tcp_timer.c
index 8a68579..16955d6 100644
--- a/sys/netinet/tcp_timer.c
+++ b/sys/netinet/tcp_timer.c
@@ -252,6 +252,33 @@ tcp_timer_2msl(xtp)
}
void
+tcp_timer_2msl_tw(xtw)
+ void *xtw;
+{
+ struct tcptw *tw = xtw;
+ int s;
+
+ s = splnet();
+ INP_INFO_WLOCK(&tcbinfo);
+ if (tw->tw_inpcb == NULL) {
+ INP_INFO_WUNLOCK(&tcbinfo);
+ splx(s);
+ return;
+ }
+ INP_LOCK(tw->tw_inpcb);
+ if (callout_pending(tw->tt_2msl) || !callout_active(tw->tt_2msl)) {
+ INP_UNLOCK(tw->tw_inpcb);
+ INP_INFO_WUNLOCK(&tcbinfo);
+ splx(s);
+ return;
+ }
+ callout_deactivate(tw->tt_2msl);
+ tcp_twclose(tw);
+ INP_INFO_WUNLOCK(&tcbinfo);
+ splx(s);
+}
+
+void
tcp_timer_keep(xtp)
void *xtp;
{
OpenPOWER on IntegriCloud