From: "YOSHIFUJI Hideaki / 吉藤英明" <yoshfuji@linux-ipv6.org>
To: mroos@linux.ee
Cc: pekkas@netcore.fi, netdev@vger.kernel.org, yoshfuji@linux-ipv6.org
Subject: Re: ipv6 routing broken in 2.6.17-rc3,4
Date: Fri, 26 May 2006 10:40:01 +0900 (JST) [thread overview]
Message-ID: <20060526.104001.96071021.yoshfuji@linux-ipv6.org> (raw)
In-Reply-To: <Pine.SOC.4.61.0605260219270.13718@math.ut.ee>
In article <Pine.SOC.4.61.0605260219270.13718@math.ut.ee> (at Fri, 26 May 2006 02:24:19 +0300 (EEST)), Meelis Roos <mroos@linux.ee> says:
>
> (To YOSHIFUJI Hideaki: this is about the
> http://comments.gmane.org/gmane.linux.network/35262 thread)
>
> Tracked it down to IPV6 merge at 2006-03-21:
> commit cd85f6e2f58282186ad720fc18482be228f0b972 is good (right before
> the bunch of patches)
> commit b00055aacdb172c05067612278ba27265fcd05ce is bad (right after the
> bunch of changes)
I guess rt6_select() is returning &ip6_null_entry and
the caller is finding next best route; e.g. default route.
Does this solve your problem?
diff --git a/net/ipv6/route.c b/net/ipv6/route.c
index 0190e39..93eb33c 100644
--- a/net/ipv6/route.c
+++ b/net/ipv6/route.c
@@ -280,10 +280,12 @@ static int inline rt6_check_neigh(struct
{
struct neighbour *neigh = rt->rt6i_nexthop;
int m = 0;
- if (neigh) {
+ if (rt->rt6i_flags & RTF_NONEXTHOP)
+ m = 1;
+ else if (neigh) {
read_lock_bh(&neigh->lock);
if (neigh->nud_state & NUD_VALID)
- m = 1;
+ m = 2;
read_unlock_bh(&neigh->lock);
}
return m;
@@ -292,15 +294,18 @@ static int inline rt6_check_neigh(struct
static int rt6_score_route(struct rt6_info *rt, int oif,
int strict)
{
- int m = rt6_check_dev(rt, oif);
+ int m, n
+
+ m = rt6_check_dev(rt, oif);
if (!m && (strict & RT6_SELECT_F_IFACE))
return -1;
#ifdef CONFIG_IPV6_ROUTER_PREF
m |= IPV6_DECODE_PREF(IPV6_EXTRACT_PREF(rt->rt6i_flags)) << 2;
#endif
- if (rt6_check_neigh(rt))
+ n = rt6_check_neigh(rt);
+ if (n > 1)
m |= 16;
- else if (strict & RT6_SELECT_F_REACHABLE)
+ else if (!n && strict & RT6_SELECT_F_REACHABLE)
return -1;
return m;
}
next prev parent reply other threads:[~2006-05-26 1:39 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-05-15 6:18 ipv6 routing broken in 2.6.17-rc3,4 Meelis Roos
2006-05-15 16:05 ` Pekka Savola
2006-05-15 17:30 ` Meelis Roos
2006-05-15 17:38 ` Meelis Roos
2006-05-25 20:17 ` Meelis Roos
2006-05-25 23:24 ` Meelis Roos
2006-05-26 1:40 ` YOSHIFUJI Hideaki / 吉藤英明 [this message]
[not found] ` <20060526.104245.106225873.yoshfuji@linux-ipv6.org>
2006-05-26 8:35 ` Meelis Roos
2006-05-26 10:08 ` YOSHIFUJI Hideaki / 吉藤英明
2006-05-26 10:44 ` Meelis Roos
2006-05-26 11:01 ` [PATCH] [IPV6] ROUTE: Don't try less preferred routes for on-link routes YOSHIFUJI Hideaki / 吉藤英明
2006-05-26 20:24 ` David Miller
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=20060526.104001.96071021.yoshfuji@linux-ipv6.org \
--to=yoshfuji@linux-ipv6.org \
--cc=mroos@linux.ee \
--cc=netdev@vger.kernel.org \
--cc=pekkas@netcore.fi \
/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