diff options
author | David Ahern <dsahern@gmail.com> | 2019-09-25 10:53:19 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2019-09-27 14:07:05 -0400 |
commit | dac91170f8e9c73784af5fad6225e954b795601c (patch) | |
tree | f153f5702dc01ec960ffd052cfd5b7b7acdf5e3a | |
parent | 3c30819dc68ab9498216421b6846123900c0a6d3 (diff) |
vrf: Do not attempt to create IPv6 mcast rule if IPv6 is disabled
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>
-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 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) | |||
1154 | struct sk_buff *skb; | 1154 | struct sk_buff *skb; |
1155 | int err; | 1155 | int err; |
1156 | 1156 | ||
1157 | if (family == AF_INET6 && !ipv6_mod_enabled()) | 1157 | if ((family == AF_INET6 || family == RTNL_FAMILY_IP6MR) && |
1158 | !ipv6_mod_enabled()) | ||
1158 | return 0; | 1159 | return 0; |
1159 | 1160 | ||
1160 | skb = nlmsg_new(vrf_fib_rule_nl_size(), GFP_KERNEL); | 1161 | skb = nlmsg_new(vrf_fib_rule_nl_size(), GFP_KERNEL); |