Changeset View
Changeset View
Standalone View
Standalone View
sys/netinet/tcp_usrreq.c
Show First 20 Lines • Show All 1,401 Lines • ▼ Show 20 Lines | tcp_usr_close(struct socket *so) | ||||
/* | /* | ||||
* If we still have full TCP state, and we're not dropped, initiate | * If we still have full TCP state, and we're not dropped, initiate | ||||
* a disconnect. | * a disconnect. | ||||
*/ | */ | ||||
if (!(inp->inp_flags & INP_TIMEWAIT) && | if (!(inp->inp_flags & INP_TIMEWAIT) && | ||||
!(inp->inp_flags & INP_DROPPED)) { | !(inp->inp_flags & INP_DROPPED)) { | ||||
tp = intotcpcb(inp); | tp = intotcpcb(inp); | ||||
tp->t_flags |= TF_CLOSED; | |||||
TCPDEBUG1(); | TCPDEBUG1(); | ||||
tcp_disconnect(tp); | tcp_disconnect(tp); | ||||
TCPDEBUG2(PRU_CLOSE); | TCPDEBUG2(PRU_CLOSE); | ||||
TCP_PROBE2(debug__user, tp, PRU_CLOSE); | TCP_PROBE2(debug__user, tp, PRU_CLOSE); | ||||
} | } | ||||
if (!(inp->inp_flags & INP_DROPPED)) { | if (!(inp->inp_flags & INP_DROPPED)) { | ||||
SOCK_LOCK(so); | SOCK_LOCK(so); | ||||
so->so_state |= SS_PROTOREF; | so->so_state |= SS_PROTOREF; | ||||
▲ Show 20 Lines • Show All 1,822 Lines • Show Last 20 Lines |