OSDN Git Service
(root)
/
tomoyo
/
tomoyo-test1.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
16f8616
)
inet_diag: adjust inet_sk_diag_fill() bug condition
author
Eric Dumazet
<edumazet@google.com>
Fri, 13 Mar 2015 22:51:11 +0000
(15:51 -0700)
committer
David S. Miller
<davem@davemloft.net>
Sat, 14 Mar 2015 19:05:10 +0000
(15:05 -0400)
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>
net/ipv4/inet_diag.c
patch
|
blob
|
history
diff --git
a/net/ipv4/inet_diag.c
b/net/ipv4/inet_diag.c
index
e1e4d8c
..
d827fe2
100644
(file)
--- 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;