From: Mark Huang Date: Mon, 7 Feb 2005 23:05:42 +0000 (+0000) Subject: - PL4167 fix: Transfer ownership of reusable TIME_WAIT buckets to X-Git-Tag: planetlab-3_0-rc10~3 X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;h=b1094d265507cb2afb46e895c7cb06eea13bf282;p=linux-2.6.git - PL4167 fix: Transfer ownership of reusable TIME_WAIT buckets to whomever VNET decided should own the packet. --- diff --git a/net/ipv4/tcp_ipv4.c b/net/ipv4/tcp_ipv4.c index 9200f6a0b..8751f21c7 100644 --- a/net/ipv4/tcp_ipv4.c +++ b/net/ipv4/tcp_ipv4.c @@ -1821,9 +1821,16 @@ process: * overridden) and the context is not entitled to read the * packet. */ - if (inet_stream_ops.bind != inet_bind && - (int) sk->sk_xid > 0 && sk->sk_xid != skb->xid) - goto discard_it; + if (inet_stream_ops.bind != inet_bind) { + /* Transfer ownership of reusable TIME_WAIT buckets to + * whomever VNET decided should own the packet. + */ + if (sk->sk_state == TCP_TIME_WAIT) + sk->sk_xid = skb->xid; + + if ((int) sk->sk_xid > 0 && sk->sk_xid != skb->xid) + goto discard_it; + } if (sk->sk_state == TCP_TIME_WAIT) goto do_time_wait;