Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a07c9207 authored by Eric Dumazet's avatar Eric Dumazet Committed by David S. Miller
Browse files

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: default avatarEric Dumazet <edumazet@google.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 16f86165
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -93,7 +93,7 @@ int inet_sk_diag_fill(struct sock *sk, struct inet_connection_sock *icsk,
		return -EMSGSIZE;
		return -EMSGSIZE;


	r = nlmsg_data(nlh);
	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_family = sk->sk_family;
	r->idiag_state = sk->sk_state;
	r->idiag_state = sk->sk_state;