Changeset View
Changeset View
Standalone View
Standalone View
sys/netinet/tcp_usrreq.c
Show First 20 Lines • Show All 266 Lines • ▼ Show 20 Lines | if (inp->inp_flags & INP_DROPPED) { | ||||
in_pcbdetach(inp); | in_pcbdetach(inp); | ||||
in_pcbfree(inp); | in_pcbfree(inp); | ||||
} else { | } else { | ||||
in_pcbdetach(inp); | in_pcbdetach(inp); | ||||
INP_WUNLOCK(inp); | INP_WUNLOCK(inp); | ||||
} | } | ||||
} else { | } else { | ||||
/* | /* | ||||
* If the connection is not in timewait, we consider two | * If the connection is not in timewait, it must be either | ||||
* two conditions: one in which no further processing is | * dropped or embryonic. | ||||
* necessary (dropped || embryonic), and one in which TCP is | |||||
* not yet done, but no longer requires the socket, so the | |||||
* pcb will persist for the time being. | |||||
* | |||||
* XXXRW: Does the second case still occur? | |||||
*/ | */ | ||||
if (inp->inp_flags & INP_DROPPED || | KASSERT(inp->inp_flags & INP_DROPPED || | ||||
tp->t_state < TCPS_SYN_SENT) { | tp->t_state < TCPS_SYN_SENT, | ||||
("%s: inp %p not dropped or embryonic", __func__, inp)); | |||||
tcp_discardcb(tp); | tcp_discardcb(tp); | ||||
in_pcbdetach(inp); | in_pcbdetach(inp); | ||||
in_pcbfree(inp); | in_pcbfree(inp); | ||||
} else { | |||||
in_pcbdetach(inp); | |||||
INP_WUNLOCK(inp); | |||||
} | |||||
} | } | ||||
} | } | ||||
#ifdef INET | #ifdef INET | ||||
/* | /* | ||||
* Give the socket an address. | * Give the socket an address. | ||||
*/ | */ | ||||
static int | static int | ||||
▲ Show 20 Lines • Show All 2,936 Lines • Show Last 20 Lines |