From b1094d265507cb2afb46e895c7cb06eea13bf282 Mon Sep 17 00:00:00 2001 From: Mark Huang Date: Mon, 7 Feb 2005 23:05:42 +0000 Subject: [PATCH] - PL4167 fix: Transfer ownership of reusable TIME_WAIT buckets to whomever VNET decided should own the packet. --- net/ipv4/tcp_ipv4.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) 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; -- 2.47.0