Re: [Patch net] ipv6: check for ip6_null_entry in __ip6_del_rt_siblings()
From: David Ahern <hidden>
Date: 2017-02-27 22:10:18
From: David Ahern <hidden>
Date: 2017-02-27 22:10:18
On 2/27/17 1:04 PM, Cong Wang wrote:
quoted
for (rt = fn->leaf; rt; rt = rt->dst.rt6_next) { + /* do not allow deletion of the null route */ + if (rt == net->ipv6.ip6_null_entry) + continue; Fixes: 0ae8133586ad net: ipv6: Allow shorthand delete of all nexthops in multipath routeNote, I moved the check into __ip6_del_rt_siblings() because __ip6_del_rt() has a same check.
that's b/c __ip6_del_rt has a second call path. __ip6_del_rt_siblings is new and is not expecting to see the null entry. Catching it before the dst_hold would be better.