[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20130710163537.GJ15411@order.stressinduktion.org>
Date: Wed, 10 Jul 2013 18:35:37 +0200
From: Hannes Frederic Sowa <hannes@...essinduktion.org>
To: Nicolas Dichtel <nicolas.dichtel@...nd.com>,
netdev@...r.kernel.org, yoshfuji@...ux-ipv6.org,
petrus.lt@...il.com, davem@...emloft.net
Subject: Re: [PATCH RFC] ipv6: fix route selection if kernel is not compiled with CONFIG_IPV6_ROUTER_PREF
On Wed, Jul 10, 2013 at 05:59:04PM +0200, Hannes Frederic Sowa wrote:
> On Wed, Jul 10, 2013 at 05:20:01PM +0200, Hannes Frederic Sowa wrote:
> > On Wed, Jul 10, 2013 at 04:10:58PM +0200, Nicolas Dichtel wrote:
> > > Le 10/07/2013 15:21, Hannes Frederic Sowa a écrit :
> > > >On Wed, Jul 10, 2013 at 02:22:55PM +0200, Nicolas Dichtel wrote:
> > > >>Le 10/07/2013 12:53, Hannes Frederic Sowa a écrit :
> > > >The route with rt6i_gateway does actually expire because I got it from
> > > >autoconf and ip -6 r l confirms this, too. It seems this is only the cached
> > > >route (I will confirm shortly). Is this still ok?
> > > I wonder why expires is 0. Even if this route is cached, the flag
> > > RTF_EXPIRES should be set. Am I wrong?
> >
> > It seems it is possible cached route gets its expiration updated. As
> > such it is not counted in the iteration but it is found as a sibling and its
> > nsiblings count is updated again.
>
> ip6_link_failure is the problem. We need to remove the route directly instead
> of calling rt6_update_expires:
>
> static void ip6_link_failure(struct sk_buff *skb)
> {
> struct rt6_info *rt;
>
> icmpv6_send(skb, ICMPV6_DEST_UNREACH, ICMPV6_ADDR_UNREACH, 0);
>
> rt = (struct rt6_info *) skb_dst(skb);
> if (rt) {
> if (rt->rt6i_flags & RTF_CACHE)
> rt6_update_expires(rt, 0);
> else if (rt->rt6i_node && (rt->rt6i_flags & RTF_DEFAULT))
> rt->rt6i_node->fn_sernum = -1;
> }
> }
With this patch I do not get the panic any more and the routing table
stabilizes and discarded all NUD nonavailable routes. I'll need to review
it myself, first. Thanks for your help!
--- a/net/ipv6/route.c
+++ b/net/ipv6/route.c
@@ -1096,10 +1096,12 @@ static void ip6_link_failure(struct sk_buff *skb)
rt = (struct rt6_info *) skb_dst(skb);
if (rt) {
- if (rt->rt6i_flags & RTF_CACHE)
- rt6_update_expires(rt, 0);
- else if (rt->rt6i_node && (rt->rt6i_flags & RTF_DEFAULT))
+ if (rt->rt6i_flags & RTF_CACHE) {
+ dst_hold(&rt->dst);
+ ip6_del_rt(rt);
+ } else if (rt->rt6i_node && (rt->rt6i_flags & RTF_DEFAULT)) {
rt->rt6i_node->fn_sernum = -1;
+ }
}
}
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists