Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

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

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
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -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);