for (inp = tcb.lh_first; inp != NULL; inp = inpnxt) {
inpnxt = inp->inp_list.le_next;
+ so = inp->inp_socket;
+
+ if (so == &tcbinfo.nat_dummy_socket)
+ continue;
+
if (in_pcb_checkstate(inp, WNT_ACQUIRE,0) == WNT_STOPUSING)
continue;
- so = inp->inp_socket;
tcp_lock(so, 1, 0);
if ((in_pcb_checkstate(inp, WNT_RELEASE,1) == WNT_STOPUSING) && so->so_usecount == 1) {
tcp_unlock(so, 1, 0);
continue;
}
- /*
- * Bogus state when port owned by SharedIP with loopback as the
- * only configured interface: BlueBox does not filters loopback
- */
- if (tp->t_state == TCP_NSTATES) {
- tcp_unlock(so, 1, 0);
- continue;
- }
-
for (i = 0; i < TCPT_NTIMERS; i++) {
if (tp->t_timer[i] && --tp->t_timer[i] == 0) {
* control block. Otherwise, check again in a bit.
*/
case TCPT_2MSL:
+ tcp_free_sackholes(tp);
if (tp->t_state != TCPS_TIME_WAIT &&
tp->t_rcvtime <= tcp_maxidle) {
tp->t_timer[TCPT_2MSL] = (unsigned long)tcp_keepintvl;
* to a longer retransmit interval and retransmit one segment.
*/
case TCPT_REXMT:
+ tcp_free_sackholes(tp);
if (++tp->t_rxtshift > TCP_MAXRXTSHIFT) {
tp->t_rxtshift = TCP_MAXRXTSHIFT;
tcpstat.tcps_timeoutdrop++;
*/
tp->snd_cwnd_prev = tp->snd_cwnd;
tp->snd_ssthresh_prev = tp->snd_ssthresh;
+ tp->snd_recover_prev = tp->snd_recover;
+ if (IN_FASTRECOVERY(tp))
+ tp->t_flags |= TF_WASFRECOVERY;
+ else
+ tp->t_flags &= ~TF_WASFRECOVERY;
tp->t_badrxtwin = tcp_now + (tp->t_srtt >> (TCP_RTT_SHIFT + 1));
}
tcpstat.tcps_rexmttimeo++;
tp->snd_ssthresh = win * tp->t_maxseg;
tp->t_dupacks = 0;
}
+ EXIT_FASTRECOVERY(tp);
(void) tcp_output(tp);
break;
goto dropit;
if ((always_keepalive ||
tp->t_inpcb->inp_socket->so_options & SO_KEEPALIVE) &&
- tp->t_state <= TCPS_CLOSING) {
+ tp->t_state <= TCPS_CLOSING || tp->t_state == TCPS_FIN_WAIT_2) {
if (tp->t_rcvtime >= TCP_KEEPIDLE(tp) + (unsigned long)tcp_maxidle)
goto dropit;
/*