Skip to content

Commit

Permalink
udp_diag: Fix the !ipv6 case
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Pavel Emelyanov authored and David S. Miller committed Dec 10, 2011
1 parent b872a23 commit 86e62ad
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions net/ipv4/udp_diag.c
Original file line number Diff line number Diff line change
Expand Up @@ -41,13 +41,15 @@ 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 IS_ENABLED(CONFIG_IPV6)
else if (req->sdiag_family == AF_INET6)
sk = __udp6_lib_lookup(&init_net,
(struct in6_addr *)req->id.idiag_src,
req->id.idiag_sport,
(struct in6_addr *)req->id.idiag_dst,
req->id.idiag_dport,
req->id.idiag_if, tbl);
#endif
else
goto out_nosk;

Expand Down

0 comments on commit 86e62ad

Please sign in to comment.