Thread (31 messages) flat view 31 messages, 4 authors, 2011-12-13
STALE5376d

[PATCH 2/2] udp_diag: Fix the !ipv6 case

From: Pavel Emelyanov <hidden>
Date: 2011-12-10 09:35:15
Subsystem: networking [general], the rest · Maintainers: "David S. Miller", Eric Dumazet, Jakub Kicinski, Paolo Abeni, Linus Torvalds

Wrap the udp6 lookup into the proper ifdef-s.

Signed-off-by: Pavel Emelyanov <redacted>

---
diff --git a/net/ipv4/udp_diag.c b/net/ipv4/udp_diag.c
index 6506344..df7f960 100644
--- a/net/ipv4/udp_diag.c
+++ b/net/ipv4/udp_diag.c
@@ -41,6 +41,7 @@ static int udp_dump_one(struct udp_table *tbl, struct sk_buff *in_skb,
 				req->id.idiag_src[0], req->id.idiag_sport,
 				req->id.idiag_dst[0], req->id.idiag_dport,
 				req->id.idiag_if, tbl);
+#if defined(CONFIG_IPV6) || defined (CONFIG_IPV6_MODULE)
 	else if (req->sdiag_family == AF_INET6)
 		sk = __udp6_lib_lookup(&init_net,
 				(struct in6_addr *)req->id.idiag_src,
@@ -48,6 +49,7 @@ static int udp_dump_one(struct udp_table *tbl, struct sk_buff *in_skb,
 				(struct in6_addr *)req->id.idiag_dst,
 				req->id.idiag_dport,
 				req->id.idiag_if, tbl);
+#endif
 	else
 		goto out_nosk;
 
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help