Re: [PATCH net 3/3] net: bonding: Fix nd_tbl NULL dereference when IPv6 is disabled
From: Hangbin Liu
Date: Sun Mar 01 2026 - 20:25:41 EST
On Sat, Feb 28, 2026 at 02:46:28PM -0300, Ricardo B. Marlière wrote:
> When booting with the 'ipv6.disable=1' parameter, the nd_tbl is never
If it's booting without ipv6 module, maybe we can use ipv6_mod_enabled() to
stop ns validation early. e.g
diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c
index a1de08ee3815..be9e01ddd6ac 100644
--- a/drivers/net/bonding/bond_main.c
+++ b/drivers/net/bonding/bond_main.c
@@ -3372,7 +3372,7 @@ int bond_rcv_validate(const struct sk_buff *skb, struct bonding *bond,
} else if (is_arp) {
return bond_arp_rcv(skb, bond, slave);
#if IS_ENABLED(CONFIG_IPV6)
- } else if (is_ipv6) {
+ } else if (is_ipv6 && ipv6_mod_enabled()) {
return bond_na_rcv(skb, bond, slave);
#endif
} else {
Thanks
Hangbin