netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net] vrf: Do not attempt to create IPv6 mcast rule if IPv6 is disabled
@ 2019-09-25 14:53 David Ahern
  2019-09-27 18:07 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: David Ahern @ 2019-09-25 14:53 UTC (permalink / raw)
  To: davem, jakub.kicinski; +Cc: netdev, David Ahern, Patrick Ruddy

From: David Ahern <dsahern@gmail.com>

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")
Signed-off-by: David Ahern <dsahern@gmail.com>
Cc: Patrick Ruddy <pruddy@vyatta.att-mail.com>
---
 drivers/net/vrf.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/net/vrf.c b/drivers/net/vrf.c
index 6e84328bdd40..a4b38a980c3c 100644
--- a/drivers/net/vrf.c
+++ b/drivers/net/vrf.c
@@ -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);
-- 
2.11.0


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH net] vrf: Do not attempt to create IPv6 mcast rule if IPv6 is disabled
  2019-09-25 14:53 [PATCH net] vrf: Do not attempt to create IPv6 mcast rule if IPv6 is disabled David Ahern
@ 2019-09-27 18:07 ` David Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2019-09-27 18:07 UTC (permalink / raw)
  To: dsahern; +Cc: jakub.kicinski, netdev, dsahern, pruddy

From: David Ahern <dsahern@kernel.org>
Date: Wed, 25 Sep 2019 07:53:19 -0700

> From: David Ahern <dsahern@gmail.com>
> 
> 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")
> Signed-off-by: David Ahern <dsahern@gmail.com>
> Cc: Patrick Ruddy <pruddy@vyatta.att-mail.com>

Applied.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-09-27 18:08 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-09-25 14:53 [PATCH net] vrf: Do not attempt to create IPv6 mcast rule if IPv6 is disabled David Ahern
2019-09-27 18:07 ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).