On Mon, Feb 27, 2017 at 1:06 PM, David Ahern <d...@cumulusnetworks.com> wrote:
> On 2/27/17 1:04 PM, Cong Wang wrote:
>>>
>>>                 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 route
>>
>> Note, 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.

Yeah, but it also depends on if we want to continue after the null entry,
at least __ip6_del_rt () returns an error for null entry, which looks more
correct than continuing to proceed after it.

Reply via email to