Changeset View
Changeset View
Standalone View
Standalone View
sys/netinet/tcp_timewait.c
| Show First 20 Lines • Show All 212 Lines • ▼ Show 20 Lines | if ((s = tcp_log_addrs(&inp->inp_inc, th, NULL, NULL))) { | ||||
| free(s, M_TCPLOG); | free(s, M_TCPLOG); | ||||
| } | } | ||||
| goto drop; | goto drop; | ||||
| } | } | ||||
| /* | /* | ||||
| * If a new connection request is received | * If a new connection request is received | ||||
| * while in TIME_WAIT, drop the old connection | * while in TIME_WAIT, drop the old connection | ||||
| * and start over if the sequence numbers | * and start over if the sequence number | ||||
| * are above the previous ones. | * is different from the previous initial | ||||
| * sequence number. | |||||
| * Allow UDP port number changes in this case. | * Allow UDP port number changes in this case. | ||||
| */ | */ | ||||
| if (((thflags & (TH_SYN | TH_ACK)) == TH_SYN) && | if (((thflags & (TH_SYN | TH_ACK)) == TH_SYN) && | ||||
| SEQ_GT(th->th_seq, tp->rcv_nxt)) { | th->th_seq != tp->irs) { | ||||
| /* | /* | ||||
| * In case we can't upgrade our lock just pretend we have | * In case we can't upgrade our lock just pretend we have | ||||
| * lost this packet. | * lost this packet. | ||||
| */ | */ | ||||
| if (INP_TRY_UPGRADE(inp) == 0) | if (INP_TRY_UPGRADE(inp) == 0) | ||||
| goto drop; | goto drop; | ||||
| if ((tp = tcp_close(tp)) != NULL) | if ((tp = tcp_close(tp)) != NULL) | ||||
| INP_WUNLOCK(inp); | INP_WUNLOCK(inp); | ||||
| ▲ Show 20 Lines • Show All 72 Lines • Show Last 20 Lines | |||||