2 * Copyright (c) 2000 Apple Computer, Inc. All rights reserved.
4 * @APPLE_LICENSE_HEADER_START@
6 * This file contains Original Code and/or Modifications of Original Code
7 * as defined in and that are subject to the Apple Public Source License
8 * Version 2.0 (the 'License'). You may not use this file except in
9 * compliance with the License. Please obtain a copy of the License at
10 * http://www.opensource.apple.com/apsl/ and read it before using this
13 * The Original Code and all software distributed under the License are
14 * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
15 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
16 * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
17 * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
18 * Please see the License for the specific language governing rights and
19 * limitations under the License.
21 * @APPLE_LICENSE_HEADER_END@
24 * Copyright (c) 1982, 1986, 1988, 1990, 1993, 1995
25 * The Regents of the University of California. All rights reserved.
27 * Redistribution and use in source and binary forms, with or without
28 * modification, are permitted provided that the following conditions
30 * 1. Redistributions of source code must retain the above copyright
31 * notice, this list of conditions and the following disclaimer.
32 * 2. Redistributions in binary form must reproduce the above copyright
33 * notice, this list of conditions and the following disclaimer in the
34 * documentation and/or other materials provided with the distribution.
35 * 3. All advertising materials mentioning features or use of this software
36 * must display the following acknowledgement:
37 * This product includes software developed by the University of
38 * California, Berkeley and its contributors.
39 * 4. Neither the name of the University nor the names of its contributors
40 * may be used to endorse or promote products derived from this software
41 * without specific prior written permission.
43 * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
44 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
45 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
46 * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
47 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
48 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
49 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
50 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
51 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
52 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
55 * @(#)tcp_timer.c 8.2 (Berkeley) 5/24/95
56 * $FreeBSD: src/sys/netinet/tcp_timer.c,v 1.34.2.11 2001/08/22 00:59:12 silby Exp $
60 #include <sys/param.h>
61 #include <sys/systm.h>
62 #include <sys/kernel.h>
64 #include <sys/sysctl.h>
65 #include <sys/socket.h>
66 #include <sys/socketvar.h>
67 #include <sys/protosw.h>
68 #include <kern/locks.h>
70 #include <kern/cpu_number.h> /* before tcp_seq.h, for tcp_random18() */
72 #include <net/route.h>
74 #include <netinet/in.h>
75 #include <netinet/in_systm.h>
76 #include <netinet/in_pcb.h>
78 #include <netinet6/in6_pcb.h>
80 #include <netinet/ip_var.h>
81 #include <netinet/tcp.h>
82 #include <netinet/tcp_fsm.h>
83 #include <netinet/tcp_seq.h>
84 #include <netinet/tcp_timer.h>
85 #include <netinet/tcp_var.h>
86 #include <netinet/tcpip.h>
88 #include <netinet/tcp_debug.h>
90 #include <sys/kdebug.h>
92 #define DBG_FNC_TCP_FAST NETDBG_CODE(DBG_NETTCP, (5 << 8))
93 #define DBG_FNC_TCP_SLOW NETDBG_CODE(DBG_NETTCP, (5 << 8) | 1)
103 sysctl_msec_to_ticks SYSCTL_HANDLER_ARGS
107 tt
= *(int *)oidp
->oid_arg1
;
110 error
= sysctl_handle_int(oidp
, &s
, 0, req
);
111 if (error
|| !req
->newptr
)
118 *(int *)oidp
->oid_arg1
= tt
;
123 SYSCTL_PROC(_net_inet_tcp
, TCPCTL_KEEPINIT
, keepinit
, CTLTYPE_INT
|CTLFLAG_RW
,
124 &tcp_keepinit
, 0, sysctl_msec_to_ticks
, "I", "");
127 SYSCTL_PROC(_net_inet_tcp
, TCPCTL_KEEPIDLE
, keepidle
, CTLTYPE_INT
|CTLFLAG_RW
,
128 &tcp_keepidle
, 0, sysctl_msec_to_ticks
, "I", "");
131 SYSCTL_PROC(_net_inet_tcp
, TCPCTL_KEEPINTVL
, keepintvl
, CTLTYPE_INT
|CTLFLAG_RW
,
132 &tcp_keepintvl
, 0, sysctl_msec_to_ticks
, "I", "");
135 SYSCTL_PROC(_net_inet_tcp
, TCPCTL_DELACKTIME
, delacktime
,
136 CTLTYPE_INT
|CTLFLAG_RW
, &tcp_delacktime
, 0, sysctl_msec_to_ticks
, "I",
137 "Time before a delayed ACK is sent");
140 SYSCTL_PROC(_net_inet_tcp
, OID_AUTO
, msl
, CTLTYPE_INT
|CTLFLAG_RW
,
141 &tcp_msl
, 0, sysctl_msec_to_ticks
, "I", "Maximum segment lifetime");
143 static int always_keepalive
= 0;
144 SYSCTL_INT(_net_inet_tcp
, OID_AUTO
, always_keepalive
, CTLFLAG_RW
,
145 &always_keepalive
, 0, "Assume SO_KEEPALIVE on all TCP connections");
147 static int tcp_keepcnt
= TCPTV_KEEPCNT
;
148 /* max idle probes */
149 int tcp_maxpersistidle
;
150 /* max idle time in persist */
153 struct inpcbhead time_wait_slots
[N_TIME_WAIT_SLOTS
];
156 u_long
*delack_bitmask
;
159 void add_to_time_wait_locked(tp
)
164 /* pcb list should be locked when we get here */
166 lck_mtx_assert(tp
->t_inpcb
->inpcb_mtx
, LCK_MTX_ASSERT_OWNED
);
169 LIST_REMOVE(tp
->t_inpcb
, inp_list
);
171 if (tp
->t_timer
[TCPT_2MSL
] == 0)
172 tp
->t_timer
[TCPT_2MSL
] = 1;
174 tp
->t_rcvtime
+= tp
->t_timer
[TCPT_2MSL
] & (N_TIME_WAIT_SLOTS
- 1);
175 tw_slot
= (tp
->t_timer
[TCPT_2MSL
] & (N_TIME_WAIT_SLOTS
- 1)) + cur_tw_slot
;
176 if (tw_slot
>= N_TIME_WAIT_SLOTS
)
177 tw_slot
-= N_TIME_WAIT_SLOTS
;
179 LIST_INSERT_HEAD(&time_wait_slots
[tw_slot
], tp
->t_inpcb
, inp_list
);
182 void add_to_time_wait(tp
)
185 struct inpcbinfo
*pcbinfo
= &tcbinfo
;
187 if (!lck_rw_try_lock_exclusive(pcbinfo
->mtx
)) {
188 tcp_unlock(tp
->t_inpcb
->inp_socket
, 0, 0);
189 lck_rw_lock_exclusive(pcbinfo
->mtx
);
190 tcp_lock(tp
->t_inpcb
->inp_socket
, 0, 0);
192 add_to_time_wait_locked(tp
);
193 lck_rw_done(pcbinfo
->mtx
);
200 * Fast timeout routine for processing delayed acks
205 struct inpcb
*inp
, *inpnxt
;
206 register struct tcpcb
*tp
;
209 struct inpcbinfo
*pcbinfo
= &tcbinfo
;
211 int delack_checked
= 0, delack_done
= 0;
213 KERNEL_DEBUG(DBG_FNC_TCP_FAST
| DBG_FUNC_START
, 0,0,0,0,0);
215 if (tcp_delack_enabled
== 0)
218 lck_rw_lock_shared(pcbinfo
->mtx
);
220 /* Walk the list of valid tcpcbs and send ACKS on the ones with DELACK bit set */
222 for (inp
= tcb
.lh_first
; inp
!= NULL
; inp
= inpnxt
) {
223 inpnxt
= inp
->inp_list
.le_next
;
224 /* NOTE: it's OK to check the tp because the pcb can't be removed while we hold pcbinfo->mtx) */
225 if ((tp
= (struct tcpcb
*)inp
->inp_ppcb
) && (tp
->t_flags
& TF_DELACK
)) {
226 if (in_pcb_checkstate(inp
, WNT_ACQUIRE
, 0) == WNT_STOPUSING
)
228 tcp_lock(inp
->inp_socket
, 1, 0);
229 if (in_pcb_checkstate(inp
, WNT_RELEASE
, 1) == WNT_STOPUSING
) {
230 tcp_unlock(inp
->inp_socket
, 1, 0);
233 if (tp
->t_flags
& TF_DELACK
) {
235 tp
->t_flags
&= ~TF_DELACK
;
236 tp
->t_flags
|= TF_ACKNOW
;
237 tcpstat
.tcps_delack
++;
238 (void) tcp_output(tp
);
240 tcp_unlock(inp
->inp_socket
, 1, 0);
243 KERNEL_DEBUG(DBG_FNC_TCP_FAST
| DBG_FUNC_END
, delack_checked
, delack_done
, tcpstat
.tcps_delack
,0,0);
244 lck_rw_done(pcbinfo
->mtx
);
248 * Tcp protocol timeout routine called every 500 ms.
249 * Updates the timers in all active tcb's and
250 * causes finite state machine actions if timers expire.
255 struct inpcb
*inp
, *inpnxt
;
263 static int tws_checked
;
265 struct inpcbinfo
*pcbinfo
= &tcbinfo
;
267 KERNEL_DEBUG(DBG_FNC_TCP_SLOW
| DBG_FUNC_START
, 0,0,0,0,0);
269 tcp_maxidle
= tcp_keepcnt
* tcp_keepintvl
;
271 lck_rw_lock_shared(pcbinfo
->mtx
);
274 * Search through tcb's and update active timers.
276 for (inp
= tcb
.lh_first
; inp
!= NULL
; inp
= inpnxt
) {
277 inpnxt
= inp
->inp_list
.le_next
;
279 if (in_pcb_checkstate(inp
, WNT_ACQUIRE
,0) == WNT_STOPUSING
)
282 so
= inp
->inp_socket
;
285 if ((in_pcb_checkstate(inp
, WNT_RELEASE
,1) == WNT_STOPUSING
) && so
->so_usecount
== 1) {
286 tcp_unlock(so
, 1, 0);
290 if (tp
== 0 || tp
->t_state
== TCPS_LISTEN
) {
291 tcp_unlock(so
, 1, 0);
295 * Bogus state when port owned by SharedIP with loopback as the
296 * only configured interface: BlueBox does not filters loopback
298 if (tp
->t_state
== TCP_NSTATES
) {
299 tcp_unlock(so
, 1, 0);
304 for (i
= 0; i
< TCPT_NTIMERS
; i
++) {
305 if (tp
->t_timer
[i
] && --tp
->t_timer
[i
] == 0) {
307 ostate
= tp
->t_state
;
309 tp
= tcp_timers(tp
, i
);
313 if (tp
->t_inpcb
->inp_socket
->so_options
315 tcp_trace(TA_USER
, ostate
, tp
,
327 tcp_unlock(so
, 1, 0);
333 KERNEL_DEBUG(DBG_FNC_TCP_SLOW
| DBG_FUNC_NONE
, tws_checked
,0,0,0,0);
336 * Process the items in the current time-wait slot
339 for (inp
= time_wait_slots
[cur_tw_slot
].lh_first
; inp
; inp
= inpnxt
)
341 inpnxt
= inp
->inp_list
.le_next
;
346 if (in_pcb_checkstate(inp
, WNT_ACQUIRE
, 0) == WNT_STOPUSING
)
349 tcp_lock(inp
->inp_socket
, 1, 0);
351 if (in_pcb_checkstate(inp
, WNT_RELEASE
, 1) == WNT_STOPUSING
)
355 if (tp
== NULL
) { /* tp already closed, remove from list */
357 printf("tcp_slowtimo: tp is null in time-wait slot!\n");
361 if (tp
->t_timer
[TCPT_2MSL
] >= N_TIME_WAIT_SLOTS
) {
362 tp
->t_timer
[TCPT_2MSL
] -= N_TIME_WAIT_SLOTS
;
363 tp
->t_rcvtime
+= N_TIME_WAIT_SLOTS
;
366 tp
->t_timer
[TCPT_2MSL
] = 0;
368 if (tp
->t_timer
[TCPT_2MSL
] == 0)
369 tp
= tcp_timers(tp
, TCPT_2MSL
); /* tp can be returned null if tcp_close is called */
371 tcp_unlock(inp
->inp_socket
, 1, 0);
374 if (lck_rw_lock_shared_to_exclusive(pcbinfo
->mtx
) != 0)
375 lck_rw_lock_exclusive(pcbinfo
->mtx
); /* Upgrade failed, lost lock no take it again exclusive */
378 for (inp
= tcb
.lh_first
; inp
!= NULL
; inp
= inpnxt
) {
379 inpnxt
= inp
->inp_list
.le_next
;
380 /* Ignore nat/SharedIP dummy pcbs */
381 if (inp
->inp_socket
== &tcbinfo
.nat_dummy_socket
)
384 if (inp
->inp_wantcnt
!= WNT_STOPUSING
)
387 so
= inp
->inp_socket
;
388 if (!lck_mtx_try_lock(inp
->inpcb_mtx
)) {/* skip if in use */
390 printf("tcp_slowtimo so=%x STOPUSING but locked...\n", so
);
395 if (so
->so_usecount
== 0)
399 /* Check for embryonic socket stuck on listener queue (4023660) */
400 if ((so
->so_usecount
== 1) && (tp
->t_state
== TCPS_CLOSED
) &&
401 (so
->so_head
!= NULL
) && (so
->so_state
& SS_INCOMP
)) {
405 lck_mtx_unlock(inp
->inpcb_mtx
);
409 /* Now cleanup the time wait ones */
410 for (inp
= time_wait_slots
[cur_tw_slot
].lh_first
; inp
; inp
= inpnxt
)
412 inpnxt
= inp
->inp_list
.le_next
;
414 if (inp
->inp_wantcnt
!= WNT_STOPUSING
)
417 so
= inp
->inp_socket
;
418 if (!lck_mtx_try_lock(inp
->inpcb_mtx
)) /* skip if in use */
420 if (so
->so_usecount
== 0)
424 /* Check for embryonic socket stuck on listener queue (4023660) */
425 if ((so
->so_usecount
== 1) && (tp
->t_state
== TCPS_CLOSED
) &&
426 (so
->so_head
!= NULL
) && (so
->so_state
& SS_INCOMP
)) {
430 lck_mtx_unlock(inp
->inpcb_mtx
);
435 if (++cur_tw_slot
>= N_TIME_WAIT_SLOTS
)
438 lck_rw_done(pcbinfo
->mtx
);
439 KERNEL_DEBUG(DBG_FNC_TCP_SLOW
| DBG_FUNC_END
, tws_checked
, cur_tw_slot
,0,0,0);
443 * Cancel all timers for TCP tp.
451 for (i
= 0; i
< TCPT_NTIMERS
; i
++)
455 int tcp_syn_backoff
[TCP_MAXRXTSHIFT
+ 1] =
456 { 1, 1, 1, 1, 1, 2, 4, 8, 16, 32, 64, 64, 64 };
458 int tcp_backoff
[TCP_MAXRXTSHIFT
+ 1] =
459 { 1, 2, 4, 8, 16, 32, 64, 64, 64, 64, 64, 64, 64 };
461 static int tcp_totbackoff
= 511; /* sum of tcp_backoff[] */
464 * TCP timer processing.
467 tcp_timers(tp
, timer
)
468 register struct tcpcb
*tp
;
472 struct socket
*so_tmp
;
473 struct tcptemp
*t_template
;
480 int isipv6
= (tp
->t_inpcb
->inp_vflag
& INP_IPV4
) == 0;
483 so_tmp
= tp
->t_inpcb
->inp_socket
;
488 * 2 MSL timeout in shutdown went off. If we're closed but
489 * still waiting for peer to close and connection has been idle
490 * too long, or if 2MSL time is up from TIME_WAIT, delete connection
491 * control block. Otherwise, check again in a bit.
494 if (tp
->t_state
!= TCPS_TIME_WAIT
&&
495 tp
->t_rcvtime
<= tcp_maxidle
) {
496 tp
->t_timer
[TCPT_2MSL
] = (unsigned long)tcp_keepintvl
;
497 add_to_time_wait_locked(tp
);
506 * Retransmission timer went off. Message has not
507 * been acked within retransmit interval. Back off
508 * to a longer retransmit interval and retransmit one segment.
511 if (++tp
->t_rxtshift
> TCP_MAXRXTSHIFT
) {
512 tp
->t_rxtshift
= TCP_MAXRXTSHIFT
;
513 tcpstat
.tcps_timeoutdrop
++;
514 tp
= tcp_drop(tp
, tp
->t_softerror
?
515 tp
->t_softerror
: ETIMEDOUT
);
516 postevent(so_tmp
, 0, EV_TIMEOUT
);
520 if (tp
->t_rxtshift
== 1) {
522 * first retransmit; record ssthresh and cwnd so they can
523 * be recovered if this turns out to be a "bad" retransmit.
524 * A retransmit is considered "bad" if an ACK for this
525 * segment is received within RTT/2 interval; the assumption
526 * here is that the ACK was already in flight. See
527 * "On Estimating End-to-End Network Path Properties" by
528 * Allman and Paxson for more details.
530 tp
->snd_cwnd_prev
= tp
->snd_cwnd
;
531 tp
->snd_ssthresh_prev
= tp
->snd_ssthresh
;
532 tp
->t_badrxtwin
= tcp_now
+ (tp
->t_srtt
>> (TCP_RTT_SHIFT
+ 1));
534 tcpstat
.tcps_rexmttimeo
++;
535 if (tp
->t_state
== TCPS_SYN_SENT
)
536 rexmt
= TCP_REXMTVAL(tp
) * tcp_syn_backoff
[tp
->t_rxtshift
];
538 rexmt
= TCP_REXMTVAL(tp
) * tcp_backoff
[tp
->t_rxtshift
];
539 TCPT_RANGESET(tp
->t_rxtcur
, rexmt
,
540 tp
->t_rttmin
, TCPTV_REXMTMAX
);
541 tp
->t_timer
[TCPT_REXMT
] = tp
->t_rxtcur
;
544 * Disable rfc1323 and rfc1644 if we havn't got any response to
545 * our third SYN to work-around some broken terminal servers
546 * (most of which have hopefully been retired) that have bad VJ
547 * header compression code which trashes TCP segments containing
548 * unknown-to-them TCP options.
550 if ((tp
->t_state
== TCPS_SYN_SENT
) && (tp
->t_rxtshift
== 3))
551 tp
->t_flags
&= ~(TF_REQ_SCALE
|TF_REQ_TSTMP
|TF_REQ_CC
);
553 * If losing, let the lower level know and try for
554 * a better route. Also, if we backed off this far,
555 * our srtt estimate is probably bogus. Clobber it
556 * so we'll take the next rtt measurement as our srtt;
557 * move the current srtt into rttvar to keep the current
558 * retransmit times until then.
560 if (tp
->t_rxtshift
> TCP_MAXRXTSHIFT
/ 4) {
563 in6_losing(tp
->t_inpcb
);
566 in_losing(tp
->t_inpcb
);
567 tp
->t_rttvar
+= (tp
->t_srtt
>> TCP_RTT_SHIFT
);
570 tp
->snd_nxt
= tp
->snd_una
;
572 * Note: We overload snd_recover to function also as the
573 * snd_last variable described in RFC 2582
575 tp
->snd_recover
= tp
->snd_max
;
577 * Force a segment to be sent.
579 tp
->t_flags
|= TF_ACKNOW
;
581 * If timing a segment in this window, stop the timer.
585 * Close the congestion window down to one segment
586 * (we'll open it by one segment for each ack we get).
587 * Since we probably have a window's worth of unacked
588 * data accumulated, this "slow start" keeps us from
589 * dumping all that data as back-to-back packets (which
590 * might overwhelm an intermediate gateway).
592 * There are two phases to the opening: Initially we
593 * open by one mss on each ack. This makes the window
594 * size increase exponentially with time. If the
595 * window is larger than the path can handle, this
596 * exponential growth results in dropped packet(s)
597 * almost immediately. To get more time between
598 * drops but still "push" the network to take advantage
599 * of improving conditions, we switch from exponential
600 * to linear window opening at some threshhold size.
601 * For a threshhold, we use half the current window
602 * size, truncated to a multiple of the mss.
604 * (the minimum cwnd that will give us exponential
605 * growth is 2 mss. We don't allow the threshhold
609 u_int win
= min(tp
->snd_wnd
, tp
->snd_cwnd
) / 2 / tp
->t_maxseg
;
612 tp
->snd_cwnd
= tp
->t_maxseg
;
613 tp
->snd_ssthresh
= win
* tp
->t_maxseg
;
616 (void) tcp_output(tp
);
620 * Persistance timer into zero window.
621 * Force a byte to be output, if possible.
624 tcpstat
.tcps_persisttimeo
++;
626 * Hack: if the peer is dead/unreachable, we do not
627 * time out if the window is closed. After a full
628 * backoff, drop the connection if the idle time
629 * (no responses to probes) reaches the maximum
630 * backoff that we would use if retransmitting.
632 if (tp
->t_rxtshift
== TCP_MAXRXTSHIFT
&&
633 (tp
->t_rcvtime
>= tcp_maxpersistidle
||
634 tp
->t_rcvtime
>= TCP_REXMTVAL(tp
) * tcp_totbackoff
)) {
635 tcpstat
.tcps_persistdrop
++;
636 so_tmp
= tp
->t_inpcb
->inp_socket
;
637 tp
= tcp_drop(tp
, ETIMEDOUT
);
638 postevent(so_tmp
, 0, EV_TIMEOUT
);
643 (void) tcp_output(tp
);
648 * Keep-alive timer went off; send something
649 * or drop connection if idle for too long.
652 tcpstat
.tcps_keeptimeo
++;
653 if (tp
->t_state
< TCPS_ESTABLISHED
)
655 if ((always_keepalive
||
656 tp
->t_inpcb
->inp_socket
->so_options
& SO_KEEPALIVE
) &&
657 tp
->t_state
<= TCPS_CLOSING
) {
658 if (tp
->t_rcvtime
>= TCP_KEEPIDLE(tp
) + (unsigned long)tcp_maxidle
)
661 * Send a packet designed to force a response
662 * if the peer is up and reachable:
663 * either an ACK if the connection is still alive,
664 * or an RST if the peer has closed the connection
665 * due to timeout or reboot.
666 * Using sequence number tp->snd_una-1
667 * causes the transmitted zero-length segment
668 * to lie outside the receive window;
669 * by the protocol spec, this requires the
670 * correspondent TCP to respond.
672 tcpstat
.tcps_keepprobe
++;
673 t_template
= tcp_maketemplate(tp
);
675 tcp_respond(tp
, t_template
->tt_ipgen
,
676 &t_template
->tt_t
, (struct mbuf
*)NULL
,
677 tp
->rcv_nxt
, tp
->snd_una
- 1, 0);
678 (void) m_free(dtom(t_template
));
680 tp
->t_timer
[TCPT_KEEP
] = tcp_keepintvl
;
682 tp
->t_timer
[TCPT_KEEP
] = TCP_KEEPIDLE(tp
);
686 if (tp
->t_inpcb
->inp_socket
->so_options
& SO_DEBUG
)
687 tcp_trace(TA_USER
, ostate
, tp
, (void *)0, (struct tcphdr
*)0,
691 tcpstat
.tcps_keepdrops
++;
692 tp
= tcp_drop(tp
, ETIMEDOUT
);
693 postevent(so_tmp
, 0, EV_TIMEOUT
);