Skip to content

Commit d71019b

Browse files
joestringerborkmann
authored andcommitted
net: core: Fix build with CONFIG_IPV6=m
Stephen Rothwell reports the following link failure with IPv6 as module: x86_64-linux-gnu-ld: net/core/filter.o: in function `sk_lookup': (.text+0x19219): undefined reference to `__udp6_lib_lookup' Fix the build by only enabling the IPv6 socket lookup if IPv6 support is compiled into the kernel. Signed-off-by: Joe Stringer <joe@wand.net.nz> Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
1 parent 33d9a7f commit d71019b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

net/core/filter.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4838,7 +4838,7 @@ struct sock *sk_lookup(struct net *net, struct bpf_sock_tuple *tuple,
48384838
sk = __udp4_lib_lookup(net, src4, tuple->ipv4.sport,
48394839
dst4, tuple->ipv4.dport,
48404840
dif, sdif, &udp_table, skb);
4841-
#if IS_ENABLED(CONFIG_IPV6)
4841+
#if IS_REACHABLE(CONFIG_IPV6)
48424842
} else {
48434843
struct in6_addr *src6 = (struct in6_addr *)&tuple->ipv6.saddr;
48444844
struct in6_addr *dst6 = (struct in6_addr *)&tuple->ipv6.daddr;

0 commit comments

Comments
 (0)