From: Denis Ovsienko <infrastation@yandex.ru>
To: cerowrt-devel <cerowrt-devel@lists.bufferbloat.net>
Cc: babel-users <babel-users@lists.alioth.debian.org>
Subject: Re: [Cerowrt-devel] [Babel-users] switching cerowrt to quagga-babeld issues
Date: Fri, 06 Jul 2012 20:36:47 +0400 [thread overview]
Message-ID: <572331341592607@web3g.yandex.ru> (raw)
In-Reply-To: <847401341324850@web9f.yandex.ru>
[-- Attachment #1: Type: text/plain, Size: 849 bytes --]
> I've got no required expertise to make such change safe for all, but starting with a Cero-only patch seems possible.
Hello, all.
Let me make an update on the problem and the solution. NetworkManager does not belong to the problem space of the current IPv6 default route issue in CeroWrt just because it is not packaged in CeroWrt. NetworkManager sample data is provided to explain the machinery of the kernel/zebra route delivery issue in different environments. So far I would prefer to get this issue resolved in CeroWrt and focus on the next show stopper.
There is a kernel patch attached, which should fix the issue with IPv6 default route delivery in CeroWrt (it does fix it on my PC). Offering it for generic kernels is a different story, which shouldn't start until, say, 1-2 weeks of safe test-driving.
Cheers.
--
Denis Ovsienko
[-- Attachment #2: 0001-fix-RTPROT_RA-markup-of-some-RA-routes-in-netlink.patch --]
[-- Type: text/plain, Size: 2241 bytes --]
From 1d969903c6221980360f76abb5e063300e5cf3bb Mon Sep 17 00:00:00 2001
From: Denis Ovsienko <infrastation@yandex.ru>
Date: Fri, 6 Jul 2012 18:08:18 +0400
Subject: [PATCH] fix RTPROT_RA markup of some RA routes in netlink
There are three types of IPv6 routes originated by kernel ND RA code:
* Default routes standing for RA packets with non-zero router lifetime.
* Connected prefix routes standing for a Prefix Information (3) RA TLV.
* Any prefix routes standing for a Route Information (24) RA TLV.
All three types are internally stored using RTPROT_KERNEL or RTPROT_BOOT
protocol code and RTF_ADDRCONF route flag (this is the only purpose for
this flag). The flag isn't directly available in netlink socket space.
Given the need to tell route origin in userspace, for routes with
nexthops in the first turn, rt6_fill_node() tries to distinguish default
router case sending the netlink route structure with RTPROT_RA (this is
respectively the only use case for this protocol code), but to no
success due to a test condition taken wrong. All three types are
delivered with RTPROT_KERNEL.
This change is modelled after the original mailing list posting by Jeff
Haran. It fixes the test condition for the default router case and
extends it for the Route Information case.
---
net/ipv6/route.c | 12 +++++++++---
1 files changed, 9 insertions(+), 3 deletions(-)
diff --git a/net/ipv6/route.c b/net/ipv6/route.c
index 999a982..2f070d6 100644
--- a/net/ipv6/route.c
+++ b/net/ipv6/route.c
@@ -2441,9 +2441,15 @@ static int rt6_fill_node(struct net *net,
if (rt->rt6i_flags & RTF_DYNAMIC)
rtm->rtm_protocol = RTPROT_REDIRECT;
else if (rt->rt6i_flags & RTF_ADDRCONF)
- rtm->rtm_protocol = RTPROT_KERNEL;
- else if (rt->rt6i_flags & RTF_DEFAULT)
- rtm->rtm_protocol = RTPROT_RA;
+ {
+ /* any ND RA route, most probably originated by kernel */
+ if (rt->rt6i_flags & RTF_DEFAULT) /* default router */
+ rtm->rtm_protocol = RTPROT_RA;
+ else if (rt->rt6i_flags & RTF_ROUTEINFO) /* any route w/nexthop */
+ rtm->rtm_protocol = RTPROT_RA;
+ else /* RTF_PREFIX_RT, interface connected prefix route */
+ rtm->rtm_protocol = RTPROT_KERNEL;
+ }
if (rt->rt6i_flags & RTF_CACHE)
rtm->rtm_flags |= RTM_F_CLONED;
--
1.7.7.6
next prev parent reply other threads:[~2012-07-06 16:36 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CAA93jw40kiOwDnOzG-_jUn7nKpky59bNBTec8ynjVwJJhKxr0Q@mail.gmail.com>
[not found] ` <2187151341044351@web9d.yandex.ru>
[not found] ` <7isjdcpm1q.fsf@lanthane.pps.jussieu.fr>
[not found] ` <40851341093226@web25d.yandex.ru>
[not found] ` <7ik3yoz7p2.fsf@lanthane.pps.jussieu.fr>
[not found] ` <CAA93jw5p9EqoK09Y_AXaHG_DfH-u_QDYU_FKOK_hhxBRDcuqAA@mail.gmail.com>
[not found] ` <1521341229978@web13h.yandex.ru>
2012-07-02 15:36 ` Dave Taht
2012-07-02 16:16 ` L. Aaron Kaplan
2012-07-02 16:44 ` Dave Taht
2012-07-02 16:54 ` L. Aaron Kaplan
2012-07-02 17:13 ` [Cerowrt-devel] DLEP [was: switching cerowrt to quagga-babeld issues] Juliusz Chroboczek
2012-07-02 17:36 ` [Cerowrt-devel] [Babel-users] " Henning Rogge
2012-07-02 19:50 ` [Cerowrt-devel] " L. Aaron Kaplan
2012-07-02 20:54 ` [Cerowrt-devel] [Babel-users] switching cerowrt to quagga-babeld issues Denis Ovsienko
2012-07-03 8:10 ` Denis Ovsienko
2012-07-03 12:35 ` Denis Ovsienko
2012-07-03 12:47 ` Gabriel Kerneis
2012-07-03 13:18 ` Dave Taht
2012-07-03 14:14 ` [Cerowrt-devel] " Denis Ovsienko
2012-07-06 16:36 ` Denis Ovsienko [this message]
2012-07-06 16:52 ` [Cerowrt-devel] IPv6 RA and RTPROT_whatever [was: switching cerowrt to quagga-babeld issues] Juliusz Chroboczek
2012-07-03 19:17 ` [Cerowrt-devel] [Babel-users] switching cerowrt to quagga-babeld issues Jim Gettys
2012-07-06 16:59 ` David Lamparter
2012-07-07 15:53 ` dpreed
2012-07-03 15:28 ` Robert Bradley
2012-07-03 15:55 ` Robert Bradley
2012-07-04 11:34 ` Denis Ovsienko
2012-07-05 14:15 ` dpreed
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
List information: https://lists.bufferbloat.net/postorius/lists/cerowrt-devel.lists.bufferbloat.net/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=572331341592607@web3g.yandex.ru \
--to=infrastation@yandex.ru \
--cc=babel-users@lists.alioth.debian.org \
--cc=cerowrt-devel@lists.bufferbloat.net \
/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