summaryrefslogtreecommitdiffstats
path: root/net/ipv4/inet_diag.c
diff options
context:
space:
mode:
authorEric Dumazet <edumazet@google.com>2015-03-13 23:51:11 +0100
committerDavid S. Miller <davem@davemloft.net>2015-03-14 20:05:10 +0100
commita07c92078d5cf32dcc7c3d673066f031d02dc454 (patch)
treea499f2cfd978596b269456dcebeb6658f4fff567 /net/ipv4/inet_diag.c
parentinet: fill request sock ir_iif for IPv4 (diff)
downloadlinux-a07c92078d5cf32dcc7c3d673066f031d02dc454.tar.xz
linux-a07c92078d5cf32dcc7c3d673066f031d02dc454.zip
inet_diag: adjust inet_sk_diag_fill() bug condition
inet_sk_diag_fill() only copes with non timewait and non request socks Signed-off-by: Eric Dumazet <edumazet@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/inet_diag.c')
-rw-r--r--net/ipv4/inet_diag.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/ipv4/inet_diag.c b/net/ipv4/inet_diag.c
index e1e4d8c0384a..d827fe2e3ce0 100644
--- a/net/ipv4/inet_diag.c
+++ b/net/ipv4/inet_diag.c
@@ -93,7 +93,7 @@ int inet_sk_diag_fill(struct sock *sk, struct inet_connection_sock *icsk,
return -EMSGSIZE;
r = nlmsg_data(nlh);
- BUG_ON(sk->sk_state == TCP_TIME_WAIT);
+ BUG_ON((1 << sk->sk_state) & (TCPF_TIME_WAIT | TCPF_NEW_SYN_RECV));
r->idiag_family = sk->sk_family;
r->idiag_state = sk->sk_state;