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) {
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
}
#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;