Commit fc1c4dc2 authored by Hideaki Yoshifuji's avatar Hideaki Yoshifuji Committed by David S. Miller

[IPV4]: Dont erroneously print UDP6 sockets in /proc/net/udp.

parent 460ead97
...@@ -1391,8 +1391,11 @@ static void *udp_seq_next(struct seq_file *seq, void *v, loff_t *pos) ...@@ -1391,8 +1391,11 @@ static void *udp_seq_next(struct seq_file *seq, void *v, loff_t *pos)
sk = v; sk = v;
sk = sk->next; sk = sk->next;
if (sk)
for (; sk; sk = sk->next) {
if (sk->family == AF_INET)
goto out; goto out;
}
state = seq->private; state = seq->private;
if (++state->bucket >= UDP_HTABLE_SIZE) if (++state->bucket >= UDP_HTABLE_SIZE)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment