[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20190619194058.GA8498@splinter>
Date: Wed, 19 Jun 2019 22:40:58 +0300
From: Ido Schimmel <idosch@...sch.org>
To: David Ahern <dsahern@...il.com>
Cc: netdev@...r.kernel.org, davem@...emloft.net, mlxsw@...lanox.com,
Ido Schimmel <idosch@...lanox.com>
Subject: Re: [PATCH net-next] ipv6: Check if route exists before notifying it
On Wed, Jun 19, 2019 at 01:10:08PM -0600, David Ahern wrote:
> On 6/19/19 11:55 AM, Ido Schimmel wrote:
> > diff --git a/net/ipv6/ip6_fib.c b/net/ipv6/ip6_fib.c
> > index 1d16a01eccf5..241a0e9a07c3 100644
> > --- a/net/ipv6/ip6_fib.c
> > +++ b/net/ipv6/ip6_fib.c
> > @@ -393,6 +393,8 @@ int call_fib6_multipath_entry_notifiers(struct net *net,
> > .nsiblings = nsiblings,
> > };
> >
> > + if (!rt)
> > + return -EINVAL;
> > rt->fib6_table->fib_seq++;
> > return call_fib6_notifiers(net, event_type, &info.info);
> > }
>
> The call to call_fib6_multipath_entry_notifiers in
> ip6_route_multipath_add happens without rt_notif set because the MPATH
> spec is empty?
There is a nexthop in the syzbot reproducer, but its length is shorter
than sizeof(struct rtnexthop).
> It seems like that check should be done in ip6_route_multipath_add
> rather than call_fib6_multipath_entry_notifiers with an extack saying
> the reason for the failure.
It seemed consistent with ip6_route_mpath_notify(). We can check if
rt6_nh_list is empty and send a proper error message. I'll do that
tomorrow morning since it's already late here.
> My expectation for call_fib6_multipath_entry_notifiers is any errors are
> only for offload handlers. (And we need to get extack added to that for
> relaying reasons.)
We already have extack there...
Powered by blists - more mailing lists