Commit 16e03737 authored by Nivedita Singhvi's avatar Nivedita Singhvi Committed by James Morris

[TCP]: Use tcp_tw_put on time-wait sockets.

parent 7029b960
...@@ -1825,12 +1825,15 @@ int tcp_v4_rcv(struct sk_buff *skb) ...@@ -1825,12 +1825,15 @@ int tcp_v4_rcv(struct sk_buff *skb)
goto discard_it; goto discard_it;
do_time_wait: do_time_wait:
if (!xfrm4_policy_check(NULL, XFRM_POLICY_IN, skb)) if (!xfrm4_policy_check(NULL, XFRM_POLICY_IN, skb)) {
goto discard_and_relse; tcp_tw_put((struct tcp_tw_bucket *) sk);
goto discard_it;
}
if (skb->len < (th->doff << 2) || tcp_checksum_complete(skb)) { if (skb->len < (th->doff << 2) || tcp_checksum_complete(skb)) {
TCP_INC_STATS_BH(TcpInErrs); TCP_INC_STATS_BH(TcpInErrs);
goto discard_and_relse; tcp_tw_put((struct tcp_tw_bucket *) sk);
goto discard_it;
} }
switch (tcp_timewait_state_process((struct tcp_tw_bucket *)sk, switch (tcp_timewait_state_process((struct tcp_tw_bucket *)sk,
skb, th, skb->len)) { skb, th, skb->len)) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment