From fc1c4dc27ef88aae69d5db0632237a53d5b371e6 Mon Sep 17 00:00:00 2001
From: Hideaki Yoshifuji <yoshfuji@linux-ipv6.org>
Date: Thu, 22 May 2003 05:05:09 -0700
Subject: [PATCH] [IPV4]: Dont erroneously print UDP6 sockets in /proc/net/udp.

---
 net/ipv4/udp.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/net/ipv4/udp.c b/net/ipv4/udp.c
index 050441e25259..635b438058f5 100644
--- a/net/ipv4/udp.c
+++ b/net/ipv4/udp.c
@@ -1391,8 +1391,11 @@ static void *udp_seq_next(struct seq_file *seq, void *v, loff_t *pos)
 
 	sk = v;
 	sk = sk->next;
-	if (sk) 
-		goto out;
+
+	for (; sk; sk = sk->next) {
+		if (sk->family == AF_INET)
+			goto out;
+	}
 
 	state = seq->private;
 	if (++state->bucket >= UDP_HTABLE_SIZE) 
-- 
2.30.9