[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAM_iQpWz2wLL2BsJgDjPvXb_Wgq0Js3QP_cda8wvo+Moh6c8Ww@mail.gmail.com>
Date: Mon, 27 Feb 2017 13:12:26 -0800
From: Cong Wang <xiyou.wangcong@...il.com>
To: David Ahern <dsa@...ulusnetworks.com>
Cc: Eric Dumazet <eric.dumazet@...il.com>,
Linux Kernel Network Developers <netdev@...r.kernel.org>,
Andrey Konovalov <andreyknvl@...gle.com>
Subject: Re: [Patch net] ipv6: check for ip6_null_entry in __ip6_del_rt_siblings()
On Mon, Feb 27, 2017 at 1:06 PM, David Ahern <dsa@...ulusnetworks.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.
Powered by blists - more mailing lists