diff options
author | Eric Dumazet <edumazet@google.com> | 2012-09-03 03:57:18 +0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-09-03 21:22:43 +0400 |
commit | e812347ccf9e8ce073b0ba0c49d03b124707b2b4 (patch) | |
tree | fc5602c3712ca9da46ceba4bb52143c07f77cebd /net | |
parent | 5b716ac728bcc01b1f2a7ed6e437196602237c27 (diff) | |
download | linux-e812347ccf9e8ce073b0ba0c49d03b124707b2b4.tar.xz |
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>
Diffstat (limited to 'net')
-rw-r--r-- | net/core/sock.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/net/core/sock.c b/net/core/sock.c index 8f67ced8d6a8..7f64467535d1 100644 --- a/net/core/sock.c +++ b/net/core/sock.c @@ -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); |