diff options
Diffstat (limited to 'drivers/net/vrf.c')
-rw-r--r-- | drivers/net/vrf.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/net/vrf.c b/drivers/net/vrf.c index b82e3527924e..b4d746943bc5 100644 --- a/drivers/net/vrf.c +++ b/drivers/net/vrf.c @@ -407,6 +407,10 @@ static int vrf_rt6_create(struct net_device *dev) struct rt6_info *rt6, *rt6_local; int rc = -ENOMEM; + /* IPv6 can be CONFIG enabled and then disabled runtime */ + if (!ipv6_mod_enabled()) + return 0; + rt6i_table = fib6_new_table(net, vrf->tb_id); if (!rt6i_table) goto out; @@ -919,6 +923,9 @@ 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()) + return 0; + skb = nlmsg_new(vrf_fib_rule_nl_size(), GFP_KERNEL); if (!skb) return -ENOMEM; |