X-Git-Url: https://git.saurik.com/apple/xnu.git/blobdiff_plain/7e4a7d3939db04e70062ae6c7bf24b8c8b2f5a7c..c331a0bec715536613c8dd5f34a4e115d5b15824:/bsd/netinet/tcp_input.c?ds=inline diff --git a/bsd/netinet/tcp_input.c b/bsd/netinet/tcp_input.c index e7fda107f..b65e9d5c6 100644 --- a/bsd/netinet/tcp_input.c +++ b/bsd/netinet/tcp_input.c @@ -1007,6 +1007,10 @@ findpcb: goto drop; #endif + /* Radar 7377561: Avoid processing packets while closing a listen socket */ + if (tp->t_state == TCPS_LISTEN && (so->so_options & SO_ACCEPTCONN) == 0) + goto drop; + if (so->so_options & (SO_DEBUG|SO_ACCEPTCONN)) { #if TCPDEBUG if (so->so_options & SO_DEBUG) { @@ -1296,7 +1300,6 @@ findpcb: KERNEL_DEBUG(DBG_FNC_TCP_NEWCONN | DBG_FUNC_END,0,0,0,0,0); } } - #if 1 lck_mtx_assert(((struct inpcb *)so->so_pcb)->inpcb_mtx, LCK_MTX_ASSERT_OWNED); #endif @@ -1369,7 +1372,7 @@ findpcb: } #if TRAFFIC_MGT - if (so->so_traffic_mgt_flags & TRAFFIC_MGT_SO_BACKGROUND) { + if (so->so_traffic_mgt_flags & TRAFFIC_MGT_SO_BG_REGULATE) { tcpstat.tcps_bg_rcvtotal++; /* Take snapshots of pkts recv;