diff --git a/net/ipv6/route.c b/net/ipv6/route.c index f54f426..3d1b260 100644 --- a/net/ipv6/route.c +++ b/net/ipv6/route.c @@ -2216,12 +2216,13 @@ static int __ip6_del_rt_siblings(struct rt6_info *rt, struct fib6_config *cfg) static int ip6_route_del(struct fib6_config *cfg) { + struct net *net = cfg->fc_nlinfo.nl_net; struct fib6_table *table; struct fib6_node *fn; struct rt6_info *rt; int err = -ESRCH; - table = fib6_get_table(cfg->fc_nlinfo.nl_net, cfg->fc_table); + table = fib6_get_table(net, cfg->fc_table); if (!table) return err; @@ -2247,6 +2248,8 @@ static int ip6_route_del(struct fib6_config *cfg) continue; if (cfg->fc_protocol && cfg->fc_protocol != rt->rt6i_protocol) continue; + if (rt == net->ipv6.ip6_null_entry) + continue; dst_hold(&rt->dst); read_unlock_bh(&table->tb6_lock);