* [PATCH] net: delete expired route in ip6_pmtu_deliver
@ 2010-12-12 1:20 Andrey Vagin
2010-12-16 20:28 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Andrey Vagin @ 2010-12-12 1:20 UTC (permalink / raw)
To: David S. Miller; +Cc: avagin, netdev, linux-kernel
The first big packets sent to a "low-MTU" client correctly
triggers the creation of a temporary route containing the reduced MTU.
But after the temporary route has expired, new ICMP6 "packet too big"
will be sent, rt6_pmtu_discovery will find the previous EXPIRED route
check that its mtu isn't bigger then in icmp packet and do nothing
before the temporary route will not deleted by gc.
I make the simple experiment:
while :; do
time ( dd if=/dev/zero bs=10K count=1 | ssh hostname dd of=/dev/null ) || break;
done
The "time" reports real 0m0.197s if a temporary route isn't expired, but
it reports real 0m52.837s (!!!!) immediately after a temporare route has
expired.
Cc: stable@kernel.org
Signed-off-by: Andrey Vagin <avagin@openvz.org>
---
net/ipv6/route.c | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletions(-)
diff --git a/net/ipv6/route.c b/net/ipv6/route.c
index 96455ffb..7659d6f 100644
--- a/net/ipv6/route.c
+++ b/net/ipv6/route.c
@@ -1565,11 +1565,16 @@ static void rt6_do_pmtu_disc(struct in6_addr *daddr, struct in6_addr *saddr,
{
struct rt6_info *rt, *nrt;
int allfrag = 0;
-
+again:
rt = rt6_lookup(net, daddr, saddr, ifindex, 0);
if (rt == NULL)
return;
+ if (rt6_check_expired(rt)) {
+ ip6_del_rt(rt);
+ goto again;
+ }
+
if (pmtu >= dst_mtu(&rt->dst))
goto out;
--
1.7.2.1
^ permalink raw reply related [flat|nested] 2+ messages in thread* Re: [PATCH] net: delete expired route in ip6_pmtu_deliver
2010-12-12 1:20 [PATCH] net: delete expired route in ip6_pmtu_deliver Andrey Vagin
@ 2010-12-16 20:28 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2010-12-16 20:28 UTC (permalink / raw)
To: avagin; +Cc: netdev, linux-kernel
From: Andrey Vagin <avagin@openvz.org>
Date: Sun, 12 Dec 2010 04:20:11 +0300
> The first big packets sent to a "low-MTU" client correctly
> triggers the creation of a temporary route containing the reduced MTU.
>
> But after the temporary route has expired, new ICMP6 "packet too big"
> will be sent, rt6_pmtu_discovery will find the previous EXPIRED route
> check that its mtu isn't bigger then in icmp packet and do nothing
> before the temporary route will not deleted by gc.
>
> I make the simple experiment:
> while :; do
> time ( dd if=/dev/zero bs=10K count=1 | ssh hostname dd of=/dev/null ) || break;
> done
>
> The "time" reports real 0m0.197s if a temporary route isn't expired, but
> it reports real 0m52.837s (!!!!) immediately after a temporare route has
> expired.
>
> Signed-off-by: Andrey Vagin <avagin@openvz.org>
Applied and queued up for -stable, thanks.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2010-12-16 20:28 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-12-12 1:20 [PATCH] net: delete expired route in ip6_pmtu_deliver Andrey Vagin
2010-12-16 20:28 ` David Miller
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).