提交 a07c9207 编写于 作者: E Eric Dumazet 提交者: David S. Miller

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: NEric Dumazet <edumazet@google.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 16f86165
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册