Netdev List
 help / color / mirror / Atom feed
From: Hannes Frederic Sowa <hannes@stressinduktion.org>
To: Pierre Emeriaud <petrus.lt@gmail.com>
Cc: netdev@vger.kernel.org, yoshfuji@linux-ipv6.org
Subject: Re: PROBLEM: Linux 3.9 more-specific ipv6 route ignored until next-hop is in neighbor cache
Date: Wed, 3 Jul 2013 07:00:07 +0200	[thread overview]
Message-ID: <20130703050007.GA11216@order.stressinduktion.org> (raw)
In-Reply-To: <CA+PSOpyxWf2s_JscuBYfOAW9hVkSqqC1JwdRDQ4WtZrkneQf6A@mail.gmail.com>

[Cc YOSHIFUJI Hideaki because of commit
887c95cc1da53f66a5890fdeab13414613010097 ("ipv6: Complete neighbour entry
removal from dst_entry.")]

On Wed, Jul 03, 2013 at 12:04:33AM +0200, Pierre Emeriaud wrote:
> Linux 3.9 more-specific ipv6 route ignored until next-hop is in neighbor cache.
> 
> When adding a route to 2000::/3 with a next-hop that is not in the
> neighbor cache, the route is not preferred over the default.

Thanks for the report!

Well.

We ignore this route because of rt6_score_route returning -1 in this case.
This traces down to rt6_check_neigh returning false.

Before the above mentioned commit we kicked off some logic to create a
neighbour entry in ip6_route_add. Now we end up with neigh == NULL.

This is a hotfix but I need to do more research regarding
CONFIG_IPV6_ROUTER_PREF and further expectations of neigh != NULL (you
can try this at your own risk ;):

--- a/net/ipv6/route.c
+++ b/net/ipv6/route.c
@@ -547,6 +547,10 @@ static inline bool rt6_check_neigh(struct rt6_info *rt)
                        ret = true;
 #endif
                read_unlock(&neigh->lock);
+       } else {
+#ifdef CONFIG_IPV6_ROUTER_PREF
+               ret = true;
+#endif
        }
        rcu_read_unlock_bh();
 

Greetings,

  Hannes

  reply	other threads:[~2013-07-03  5:00 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-02 22:04 PROBLEM: Linux 3.9 more-specific ipv6 route ignored until next-hop is in neighbor cache Pierre Emeriaud
2013-07-03  5:00 ` Hannes Frederic Sowa [this message]
2013-07-03 18:15   ` Hannes Frederic Sowa
2013-07-03 18:21     ` Sergei Shtylyov
2013-07-03 18:45       ` Hannes Frederic Sowa
2013-07-04  0:51         ` David Miller
2013-07-04  5:20           ` Pierre Emeriaud

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=20130703050007.GA11216@order.stressinduktion.org \
    --to=hannes@stressinduktion.org \
    --cc=netdev@vger.kernel.org \
    --cc=petrus.lt@gmail.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