diff options
author | David Ahern <dsahern@gmail.com> | 2019-09-25 07:53:19 -0700 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2019-10-05 13:13:20 +0200 |
commit | 6386577b29277cf40a8589ca8182916513eb7459 (patch) | |
tree | e7c2e77b7bfcdf17a90c4208a6c8f97e1eacdf9f /drivers/net | |
parent | 229b983d5221b1d783f0926e2bf8f5ab776454a2 (diff) | |
download | linux-stable-6386577b29277cf40a8589ca8182916513eb7459.tar.gz linux-stable-6386577b29277cf40a8589ca8182916513eb7459.tar.bz2 linux-stable-6386577b29277cf40a8589ca8182916513eb7459.zip |
vrf: Do not attempt to create IPv6 mcast rule if IPv6 is disabled
[ Upstream commit dac91170f8e9c73784af5fad6225e954b795601c ]
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>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/vrf.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/net/vrf.c b/drivers/net/vrf.c index 97fb0cb1b97a..1a22165afb39 100644 --- a/drivers/net/vrf.c +++ b/drivers/net/vrf.c @@ -1153,7 +1153,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); |