Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d71019b5 authored by Joe Stringer's avatar Joe Stringer Committed by Daniel Borkmann
Browse files

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: default avatarJoe Stringer <joe@wand.net.nz>
Signed-off-by: default avatarDaniel Borkmann <daniel@iogearbox.net>
parent 33d9a7fd
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -4838,7 +4838,7 @@ struct sock *sk_lookup(struct net *net, struct bpf_sock_tuple *tuple,
			sk = __udp4_lib_lookup(net, src4, tuple->ipv4.sport,
					       dst4, tuple->ipv4.dport,
					       dif, sdif, &udp_table, skb);
#if IS_ENABLED(CONFIG_IPV6)
#if IS_REACHABLE(CONFIG_IPV6)
	} else {
		struct in6_addr *src6 = (struct in6_addr *)&tuple->ipv6.saddr;
		struct in6_addr *dst6 = (struct in6_addr *)&tuple->ipv6.daddr;