Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

net: vxlan: check ipv6_mod_enabled() on neigh_reduce()

IPv6 must be enabled or otherwise neigh_reduce() might cause a kernel
panic. This was prevented by a check on in6_dev. Use ipv6_mod_enabled()
instead as it is cleaner and also consistent with the code at
route_shortcircuit().

Signed-off-by: Fernando Fernandez Mancera <fmancera@suse.de>
Reviewed-by: Ido Schimmel <idosch@nvidia.com>
Link: https://patch.msgid.link/20260330121033.4479-1-fmancera@suse.de
Signed-off-by: Jakub Kicinski <kuba@kernel.org>

authored by

Fernando Fernandez Mancera and committed by
Jakub Kicinski
58e416e2 d7709812

+1 -3
+1 -3
drivers/net/vxlan/vxlan_core.c
··· 2027 2027 struct vxlan_dev *vxlan = netdev_priv(dev); 2028 2028 const struct in6_addr *daddr; 2029 2029 const struct ipv6hdr *iphdr; 2030 - struct inet6_dev *in6_dev; 2031 2030 struct neighbour *n; 2032 2031 struct nd_msg *msg; 2033 2032 2034 2033 rcu_read_lock(); 2035 - in6_dev = __in6_dev_get(dev); 2036 - if (!in6_dev) 2034 + if (unlikely(!ipv6_mod_enabled())) 2037 2035 goto out; 2038 2036 2039 2037 iphdr = ipv6_hdr(skb);