--- HEAD/sys/netinet/tcp_subr.c 2007-12-11 18:51:53.000000000 -0800 +++ toestack/sys/netinet/tcp_subr.c 2007-12-08 22:25:16.000000000 -0800 @@ -85,6 +85,7 @@ #include #include #include +#include #ifdef INET6 #include #endif @@ -651,7 +652,7 @@ if (TCPS_HAVERCVDSYN(tp->t_state)) { tp->t_state = TCPS_CLOSED; - (void) tcp_output(tp); + (void) tcp_gen_abort(tp); tcpstat.tcps_drops++; } else tcpstat.tcps_conndrops++; @@ -749,6 +750,9 @@ tp->t_segqlen--; tcp_reass_qsize--; } + if (tp->t_flags & TF_TOE) + tcp_gen_detach(tp); + tcp_free_sackholes(tp); inp->inp_ppcb = NULL; tp->t_inpcb = NULL; @@ -768,6 +772,9 @@ INP_INFO_WLOCK_ASSERT(&tcbinfo); INP_LOCK_ASSERT(inp); + if (tp->t_state == TCPS_LISTEN) + tcp_gen_listen_close(tp); + in_pcbdrop(inp); tcpstat.tcps_closed++; KASSERT(inp->inp_socket != NULL, ("tcp_close: inp_socket NULL")); @@ -1562,7 +1569,7 @@ tp->snd_recover = tp->snd_max; if (tp->t_flags & TF_SACK_PERMIT) EXIT_FASTRECOVERY(tp); - tcp_output(tp); + tcp_gen_send(tp); return (inp); }