From: Hannes Frederic Sowa <hannes@stressinduktion.org>
To: Duan Jiong <duanj.fnst@cn.fujitsu.com>
Cc: David Miller <davem@davemloft.net>, netdev@vger.kernel.org
Subject: Re: [PATCH] ipv6: replace RTF_ROUTEINFO with RTF_ADDRCONF in rt6_get_route_info()
Date: Thu, 7 Nov 2013 02:51:00 +0100 [thread overview]
Message-ID: <20131107015100.GF8144@order.stressinduktion.org> (raw)
In-Reply-To: <5279EF31.4040705@cn.fujitsu.com>
On Wed, Nov 06, 2013 at 03:26:41PM +0800, Duan Jiong wrote:
>
> As the rfc 4191 said, the Router Preference and Lifetime values in a
> ::/0 Route Information Option should override the preference and lifetime
> values in the Router Advertisement header. But when the kernel deals with
> a ::/0 Route Information Option, the rt6_get_route_info() always return
> NULL, that means that overriding will not happen, because those default
> routers were added without flag RTF_ROUTEINFO in rt6_add_dflt_router().
>
> In order to match those default routers, we can replace RTF_ROUTEINFO
> with RTF_ADDRCONF in rt6_get_route_info().
>
> Signed-off-by: Duan Jiong <duanj.fnst@cn.fujitsu.com>
Hmm, that looks like a bug. Nice catch!
Couldn't we just replace the rt6_get_route_info in rt6_route_rcv with a call
to rt6_get_dflt_router? Seems easier, already handles the ::/0 case and also
does preserve the check for the RTF_ROUTEINFO flag in rt6_add_route_info.
Greetings,
Hannes
next prev parent reply other threads:[~2013-11-07 1:51 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-11-06 7:26 [PATCH] ipv6: replace RTF_ROUTEINFO with RTF_ADDRCONF in rt6_get_route_info() Duan Jiong
2013-11-07 1:51 ` Hannes Frederic Sowa [this message]
2013-11-07 2:01 ` Duan Jiong
2013-11-07 2:42 ` Hannes Frederic Sowa
2013-11-07 4:19 ` Duan Jiong
2013-11-07 12:19 ` 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=20131107015100.GF8144@order.stressinduktion.org \
--to=hannes@stressinduktion.org \
--cc=davem@davemloft.net \
--cc=duanj.fnst@cn.fujitsu.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 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).