net: sock_edemux() should take care of timewait sockets
sock_edemux() can handle either a regular socket or a timewait socket Signed-off-by: Eric Dumazet <edumazet@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
5b716ac728
commit
e812347ccf
|
@ -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);
|
||||
|
||||
|
|
Loading…
Reference in a new issue