From: David Miller <davem@davemloft.net>
To: akpm@linux-foundation.org
Cc: netdev@vger.kernel.org, bugzilla-daemon@bugzilla.kernel.org,
bugme-daemon@bugzilla.kernel.org, slash@ac.auone-net.jp,
ernstp@gmail.com
Subject: Re: [Bugme-new] [Bug 29252] New: IPv6 doesn't work in a kvm guest.
Date: Wed, 09 Mar 2011 15:58:18 -0800 (PST) [thread overview]
Message-ID: <20110309.155818.212679516.davem@davemloft.net> (raw)
In-Reply-To: <20110217142517.b9919481.akpm@linux-foundation.org>
Ok, the following should address both bugs, #29252 and #30462, please
give it some testing.
--------------------
ipv6: Don't create clones of nonexthop routes forever.
Addresses https://bugzilla.kernel.org/show_bug.cgi?id=29252
Addresses https://bugzilla.kernel.org/show_bug.cgi?id=30462
In commit d80bc0fd262ef840ed4e82593ad6416fa1ba3fc4 ("ipv6: Always
clone offlink routes.") we forced the kernel to always clone offlink
routes.
The reason we do that is to make sure we never bind an inetpeer to a
prefixed route.
The logic turned on here has existed in the tree for many years,
but was always off due to a protecting CPP define. So perhaps
it's no surprise that there is a logic bug here.
The issue is that there is nothing that stops the cloning process.
Every route call will find the same route in the same condition,
reclone it, and insert.
This causes two problems:
1) If the in6_rt_ins() call succeeds, we get tons of crap in the
routing tree.
2) If the int6_rt_ins() call fails, we get no networking to that
destination.
We've had reports of both cases.
End the loop and the failures by keying on the RTF_CACHE flag which
will only be set in the clone routes.
Reported-by: slash@ac.auone-net.jp
Reported-by: Ernst Sjöstrand <ernstp@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
diff --git a/net/ipv6/route.c b/net/ipv6/route.c
index 904312e..8963635 100644
--- a/net/ipv6/route.c
+++ b/net/ipv6/route.c
@@ -739,8 +739,10 @@ restart:
if (!rt->rt6i_nexthop && !(rt->rt6i_flags & RTF_NONEXTHOP))
nrt = rt6_alloc_cow(rt, &fl->fl6_dst, &fl->fl6_src);
- else
+ else if (!(rt->rt6i_flags & RTF_CACHE))
nrt = rt6_alloc_clone(rt, &fl->fl6_dst);
+ else
+ goto out2;
dst_release(&rt->dst);
rt = nrt ? : net->ipv6.ip6_null_entry;
next prev parent reply other threads:[~2011-03-09 23:57 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <bug-29252-10286@https.bugzilla.kernel.org/>
2011-02-17 22:25 ` [Bugme-new] [Bug 29252] New: IPv6 doesn't work in a kvm guest Andrew Morton
2011-02-17 22:32 ` David Miller
2011-03-09 23:58 ` David Miller [this message]
2011-03-10 3:20 ` David Miller
2011-03-10 4:04 ` David Miller
2011-03-11 19:44 ` Ernst Sjöstrand
2011-03-11 20:15 ` 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=20110309.155818.212679516.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=akpm@linux-foundation.org \
--cc=bugme-daemon@bugzilla.kernel.org \
--cc=bugzilla-daemon@bugzilla.kernel.org \
--cc=ernstp@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=slash@ac.auone-net.jp \
/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;
as well as URLs for NNTP newsgroup(s).