From: Nicolas Dichtel <nicolas.dichtel@6wind.com>
To: hannes@stressinduktion.org
Cc: netdev@vger.kernel.org, yoshfuji@linux-ipv6.org,
petrus.lt@gmail.com, davem@davemloft.net
Subject: Re: [PATCH RFC] ipv6: fix route selection if kernel is not compiled with CONFIG_IPV6_ROUTER_PREF
Date: Thu, 11 Jul 2013 10:04:47 +0200 [thread overview]
Message-ID: <51DE671F.5050706@6wind.com> (raw)
In-Reply-To: <20130710212149.GA26122@order.stressinduktion.org>
Le 10/07/2013 23:21, Hannes Frederic Sowa a écrit :
> On Wed, Jul 10, 2013 at 04:10:58PM +0200, Nicolas Dichtel wrote:
>> I wonder why expires is 0. Even if this route is cached, the flag
>> RTF_EXPIRES should be set. Am I wrong?
>
> rt6_set_from deliberately clears the RTF_EXPIRES when creating a cached copy
> of the route if the route is an autoconfigured default route.
>
> Maybe the criterion for exclusion of which routes can get into an ecmp route
> set should be revisited? This could result in strange effects for users
> working with two interfaces, both receiving a RA with default routes.
Agreed. Here is a proposal, what do you think?
[PATCH] ipv6: don't use autoconfigured route for ecmp
The intention was already there by checking the flag RTF_EXPIRES, but this flag
is removed from the default route by rt6_set_from() when this route is cached.
Let's add a check against RTF_ADDRCONF.
Spotted-by: Hannes Frederic Sowa <hannes@stressinduktion.org>
Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
---
net/ipv6/ip6_fib.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/net/ipv6/ip6_fib.c b/net/ipv6/ip6_fib.c
index 192dd1a..87e31c6 100644
--- a/net/ipv6/ip6_fib.c
+++ b/net/ipv6/ip6_fib.c
@@ -686,14 +686,14 @@ static int fib6_add_rt2node(struct fib6_node *fn, struct
rt6_info *rt,
* of siblings, and later we will add our route to the
* list.
* Only static routes (which don't have flag
- * RTF_EXPIRES) are used for ECMPv6.
+ * RTF_EXPIRES nor RTF_ADDRCONF) are used for ECMPv6.
*
* To avoid long list, we only had siblings if the
* route have a gateway.
*/
if (rt->rt6i_flags & RTF_GATEWAY &&
- !(rt->rt6i_flags & RTF_EXPIRES) &&
- !(iter->rt6i_flags & RTF_EXPIRES))
+ !(rt->rt6i_flags & (RTF_EXPIRES|RTF_ADDRCONF)) &&
+ !(iter->rt6i_flags & (RTF_EXPIRES|RTF_ADDRCONF)))
rt->rt6i_nsiblings++;
}
--
1.8.2.1
next prev parent reply other threads:[~2013-07-11 8:04 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-07-07 17:30 [PATCH RFC] ipv6: fix route selection if kernel is not compiled with CONFIG_IPV6_ROUTER_PREF Hannes Frederic Sowa
2013-07-09 21:57 ` Hannes Frederic Sowa
2013-07-10 7:54 ` Nicolas Dichtel
2013-07-10 9:28 ` Nicolas Dichtel
2013-07-10 10:53 ` Hannes Frederic Sowa
2013-07-10 12:22 ` Nicolas Dichtel
2013-07-10 13:21 ` Hannes Frederic Sowa
2013-07-10 14:10 ` Nicolas Dichtel
2013-07-10 15:20 ` Hannes Frederic Sowa
2013-07-10 15:59 ` Hannes Frederic Sowa
2013-07-10 16:35 ` Hannes Frederic Sowa
2013-07-11 8:07 ` Nicolas Dichtel
2013-07-10 21:21 ` Hannes Frederic Sowa
2013-07-11 8:04 ` Nicolas Dichtel [this message]
2013-07-11 10:24 ` Hannes Frederic Sowa
2013-07-11 14:46 ` Hannes Frederic Sowa
2013-07-11 14:57 ` Nicolas Dichtel
2013-07-12 8:51 ` Hannes Frederic Sowa
2013-07-12 12:04 ` Nicolas Dichtel
2013-07-12 16:19 ` Hannes Frederic Sowa
2013-07-12 19:01 ` Nicolas Dichtel
2013-07-12 19:20 ` Hannes Frederic Sowa
2013-07-12 21:48 ` Hannes Frederic Sowa
2013-07-10 11:15 ` Hannes Frederic Sowa
2013-07-10 11:40 ` Hannes Frederic Sowa
2013-07-10 12:08 ` Nicolas Dichtel
2013-07-10 13:17 ` Hannes Frederic Sowa
2013-07-10 13:49 ` Hannes Frederic Sowa
2013-07-10 14:30 ` Nicolas Dichtel
2013-07-10 14:34 ` Hannes Frederic Sowa
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=51DE671F.5050706@6wind.com \
--to=nicolas.dichtel@6wind.com \
--cc=davem@davemloft.net \
--cc=hannes@stressinduktion.org \
--cc=netdev@vger.kernel.org \
--cc=petrus.lt@gmail.com \
--cc=yoshfuji@linux-ipv6.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.