All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ido Schimmel <idosch@idosch.org>
To: David Ahern <dsahern@gmail.com>
Cc: netdev@vger.kernel.org, davem@davemloft.net, mlxsw@mellanox.com,
	Ido Schimmel <idosch@mellanox.com>
Subject: Re: [PATCH net-next] ipv6: Check if route exists before notifying it
Date: Wed, 19 Jun 2019 22:40:58 +0300	[thread overview]
Message-ID: <20190619194058.GA8498@splinter> (raw)
In-Reply-To: <69f3262d-e6d0-943e-20a0-c711be4d35d7@gmail.com>

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...

  reply	other threads:[~2019-06-19 19:41 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-19 17:55 [PATCH net-next] ipv6: Check if route exists before notifying it Ido Schimmel
2019-06-19 19:10 ` David Ahern
2019-06-19 19:40   ` Ido Schimmel [this message]
2019-06-19 19:54     ` David Ahern

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190619194058.GA8498@splinter \
    --to=idosch@idosch.org \
    --cc=davem@davemloft.net \
    --cc=dsahern@gmail.com \
    --cc=idosch@mellanox.com \
    --cc=mlxsw@mellanox.com \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.