Skip to contentSkip to conversation

vrf: Do not attempt to create IPv6 mcast rule if IPv6 is disabled

PATCH Applied David Ahern 2 participants 2 messages Sep 25, 2019 – Sep 27, 2019

Subsystems (3)
lore
Share & tools
lore

David Ahern

author maintainer
#0 lore raw

PATCH 1/1 vrf: Do not attempt to create IPv6 mcast rule if IPv6 is disabled

From: David Ahern <[email protected]>

A user reported that vrf create fails when IPv6 is disabled at boot using 'ipv6.disable=1':
https://bugzilla.kernel.org/show_bug.cgi?id=204903

The failure is adding fib rules at create time. Add RTNL_FAMILY_IP6MR to the check in vrf_fib_rule if ipv6_mod_enabled is disabled.

Fixes e4a38c0c4b27 ("ipv6: add vrf table handling code for ipv6 mcast")
Cc Patrick Ruddy <[email protected]>
---
 drivers/net/vrf.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/net/vrf.c +2 -1
index 6e84328bdd40..a4b38a980c3c 100644
@@ -1154,7 +1154,8 @@ static int vrf_fib_rule(const struct net_device *dev, __u8 family, bool add_it)
 	struct sk_buff *skb;
 	int err;
 
-	if (family == AF_INET6 && !ipv6_mod_enabled())
+	if ((family == AF_INET6 || family == RTNL_FAMILY_IP6MR) &&
+	    !ipv6_mod_enabled())
 		return 0;
 
 	skb = nlmsg_new(vrf_fib_rule_nl_size(), GFP_KERNEL);
Signature · 1 line
2.11.0
maintainer Applied
#1 lore raw

From: David Ahern <[email protected]>
Date: Wed, 25 Sep 2019 07:53:19 -0700

Quoted 4 lines

From: David Ahern <[email protected]>

A user reported that vrf create fails when IPv6 is disabled at boot using 'ipv6.disable=1':

Quoted 8 lines
   https://bugzilla.kernel.org/show_bug.cgi?id=204903

The failure is adding fib rules at create time. Add RTNL_FAMILY_IP6MR to the check in vrf_fib_rule if ipv6_mod_enabled is disabled.

Fixes e4a38c0c4b27 ("ipv6: add vrf table handling code for ipv6 mcast")
Cc Patrick Ruddy <[email protected]>

Applied.