Commit e812347c authored by Eric Dumazet's avatar Eric Dumazet Committed by David S. Miller

net: sock_edemux() should take care of timewait sockets

sock_edemux() can handle either a regular socket or a timewait socket
Signed-off-by: default avatarEric Dumazet <edumazet@google.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 5b716ac7
......@@ -1523,7 +1523,12 @@ EXPORT_SYMBOL(sock_rfree);
void sock_edemux(struct sk_buff *skb)
{
sock_put(skb->sk);
struct sock *sk = skb->sk;
if (sk->sk_state == TCP_TIME_WAIT)
inet_twsk_put(inet_twsk(sk));
else
sock_put(sk);
}
EXPORT_SYMBOL(sock_edemux);
......
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