udp_diag: Fix the !ipv6 case

Wrap the udp6 lookup into the proper ifdef-s.

Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Pavel Emelyanov 2011-12-09 23:35:07 +00:00 committed by David S. Miller
parent b872a2371f
commit 86e62ad6b2
1 changed files with 2 additions and 0 deletions

View File

@ -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_src[0], req->id.idiag_sport,
req->id.idiag_dst[0], req->id.idiag_dport, req->id.idiag_dst[0], req->id.idiag_dport,
req->id.idiag_if, tbl); req->id.idiag_if, tbl);
#if IS_ENABLED(CONFIG_IPV6)
else if (req->sdiag_family == AF_INET6) else if (req->sdiag_family == AF_INET6)
sk = __udp6_lib_lookup(&init_net, sk = __udp6_lib_lookup(&init_net,
(struct in6_addr *)req->id.idiag_src, (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, (struct in6_addr *)req->id.idiag_dst,
req->id.idiag_dport, req->id.idiag_dport,
req->id.idiag_if, tbl); req->id.idiag_if, tbl);
#endif
else else
goto out_nosk; goto out_nosk;