diff options
author | Eric Dumazet <edumazet@google.com> | 2012-09-03 01:57:18 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-09-03 19:22:43 +0200 |
commit | e812347ccf9e8ce073b0ba0c49d03b124707b2b4 (patch) | |
tree | fc5602c3712ca9da46ceba4bb52143c07f77cebd /net | |
parent | Merge branch 'for-next' of git://git.samba.org/sfrench/cifs-2.6 (diff) | |
download | linux-e812347ccf9e8ce073b0ba0c49d03b124707b2b4.tar.xz linux-e812347ccf9e8ce073b0ba0c49d03b124707b2b4.zip |
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); |