> 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
From 1d969903c6221980360f76abb5e063300e5cf3bb Mon Sep 17 00:00:00 2001
From: Denis Ovsienko <[email protected]>
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
_______________________________________________
Cerowrt-devel mailing list
[email protected]
https://lists.bufferbloat.net/listinfo/cerowrt-devel