netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Eric Dumazet <eric.dumazet@gmail.com>
To: dsahern@kernel.org, netdev@vger.kernel.org
Cc: David Ahern <dsahern@gmail.com>
Subject: Re: [PATCH v2 net] net/ipv6: Do not allow device only routes via the multipath API
Date: Mon, 16 Jul 2018 09:09:44 -0700	[thread overview]
Message-ID: <5d9122fa-8f9a-b11a-3496-06976c96a08b@gmail.com> (raw)
In-Reply-To: <20180715163519.12917-1-dsahern@kernel.org>



On 07/15/2018 09:35 AM, dsahern@kernel.org wrote:
> From: David Ahern <dsahern@gmail.com>
> 
> Eric reported that reverting the patch that fixed and simplified IPv6
> multipath routes means reverting back to invalid userspace notifications.
> eg.,
> $ ip -6 route add 2001:db8:1::/64 nexthop dev eth0 nexthop dev eth1
> 
> only generates a single notification:
> 2001:db8:1::/64 dev eth0 metric 1024 pref medium
> 
> While working on a fix for this problem I found another case that is just
> broken completely - a multipath route with a gateway followed by device
> followed by gateway:
>     $ ip -6 ro add 2001:db8:103::/64
>           nexthop via 2001:db8:1::64
>           nexthop dev dummy2
>           nexthop via 2001:db8:3::64
> 
> In this case the device only route is dropped completely - no notification
> to userpsace but no addition to the FIB either:
> 
> $ ip -6 ro ls
> 2001:db8:1::/64 dev dummy1 proto kernel metric 256 pref medium
> 2001:db8:2::/64 dev dummy2 proto kernel metric 256 pref medium
> 2001:db8:3::/64 dev dummy3 proto kernel metric 256 pref medium
> 2001:db8:103::/64 metric 1024
> 	nexthop via 2001:db8:1::64 dev dummy1 weight 1
> 	nexthop via 2001:db8:3::64 dev dummy3 weight 1 pref medium
> fe80::/64 dev dummy1 proto kernel metric 256 pref medium
> fe80::/64 dev dummy2 proto kernel metric 256 pref medium
> fe80::/64 dev dummy3 proto kernel metric 256 pref medium
> 
> Really, IPv6 multipath is just FUBAR'ed beyond repair when it comes to
> device only routes, so do not allow it all.
> 
> This change will break any scripts relying on the mpath api for insert,
> but I don't see any other way to handle the permutations. Besides, since
> the routes are added to the FIB as standalone (non-multipath) routes the
> kernel is not doing what the user requested, so it might as well tell the
> user that.

Yes, I guess we have no real choice for the moment.

Thanks David

Reviewed-by: Eric Dumazet <edumazet@google.com>

  reply	other threads:[~2018-07-16 16:37 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-15 16:35 [PATCH v2 net] net/ipv6: Do not allow device only routes via the multipath API dsahern
2018-07-16 16:09 ` Eric Dumazet [this message]
2018-07-16 17:14   ` David Ahern
2018-07-16 21:09 ` David Miller
2018-07-17 12:13   ` David Ahern
2018-07-18 20:45     ` David Miller

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=5d9122fa-8f9a-b11a-3496-06976c96a08b@gmail.com \
    --to=eric.dumazet@gmail.com \
    --cc=dsahern@gmail.com \
    --cc=dsahern@kernel.org \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).