netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: pmarks@google.com
Cc: yoshfuji@linux-ipv6.org, netdev@vger.kernel.org
Subject: Re: [PATCH] ipv6: Fix default route failover when CONFIG_IPV6_ROUTER_PREF=n
Date: Mon, 03 Dec 2012 13:59:23 -0500 (EST)	[thread overview]
Message-ID: <20121203.135923.1359930693250099951.davem@davemloft.net> (raw)
In-Reply-To: <1354442421-689-1-git-send-email-pmarks@google.com>

From: Paul Marks <pmarks@google.com>
Date: Sun,  2 Dec 2012 02:00:21 -0800

> I believe this commit from 2008 was incorrect:
> http://git.kernel.org/?p=linux/kernel/git/torvalds/linux.git;a=commitdiff;h=398bcbebb6f721ac308df1e3d658c0029bb74503
> 
> When CONFIG_IPV6_ROUTER_PREF is disabled, the kernel should follow
> RFC4861 section 6.3.6: if no route is NUD_VALID, then traffic should be
> sprayed across all routers (indirectly triggering NUD) until one of them
> becomes NUD_VALID.
> 
> However, the following experiment demonstrates that this does not work:
> 
> 1) Connect to an IPv6 network.
> 2) Change the router's MAC (and link-local) address.
> 
> The kernel will lock onto the first router and never try the new one, even
> if the first becomes unreachable.  This patch fixes the problem by
> allowing rt6_check_neigh() to return 0; if all routers return 0, then
> rt6_select() will fall back to round-robin behavior.
> 
> This patch should have no effect when CONFIG_IPV6_ROUTER_PREF=y.
> 
> Note that rt6_check_neigh() is only used in a boolean context, so the
> presence of both "m = 1" and "m = 2" was irrelevant and confusing.
> 
> Signed-off-by: Paul Marks <pmarks@google.com>

The values '1' and '2' used to influence rt6_score_route() in different
ways.

Please change rt6_check_neigh() to return a "bool" if you are going to
do this.

Thanks.

  reply	other threads:[~2012-12-03 18:59 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-12-02 10:00 [PATCH] ipv6: Fix default route failover when CONFIG_IPV6_ROUTER_PREF=n Paul Marks
2012-12-03 18:59 ` David Miller [this message]
2012-12-03 20:26   ` [PATCH v2] " Paul Marks
2012-12-03 20:35     ` 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=20121203.135923.1359930693250099951.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=netdev@vger.kernel.org \
    --cc=pmarks@google.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 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).