提交 e812347c 编写于 作者: E Eric Dumazet 提交者: 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: NEric Dumazet <edumazet@google.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 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% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册