diff options
author | Andrey Vagin <avagin@openvz.org> | 2010-12-11 10:20:11 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-12-16 15:28:13 -0500 |
commit | d3052b557a1c94c21f50465702fa886753ce6b43 (patch) | |
tree | 5a48598ed08bef56cc71355f84eff04f13622780 /net | |
parent | af3e5bd5f650163c2e12297f572910a1af1b8236 (diff) |
ipv6: delete expired route in ip6_pmtu_deliver
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>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r-- | 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 96455ffb76fb..7659d6f16e6b 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, | |||
1565 | { | 1565 | { |
1566 | struct rt6_info *rt, *nrt; | 1566 | struct rt6_info *rt, *nrt; |
1567 | int allfrag = 0; | 1567 | int allfrag = 0; |
1568 | 1568 | again: | |
1569 | rt = rt6_lookup(net, daddr, saddr, ifindex, 0); | 1569 | rt = rt6_lookup(net, daddr, saddr, ifindex, 0); |
1570 | if (rt == NULL) | 1570 | if (rt == NULL) |
1571 | return; | 1571 | return; |
1572 | 1572 | ||
1573 | if (rt6_check_expired(rt)) { | ||
1574 | ip6_del_rt(rt); | ||
1575 | goto again; | ||
1576 | } | ||
1577 | |||
1573 | if (pmtu >= dst_mtu(&rt->dst)) | 1578 | if (pmtu >= dst_mtu(&rt->dst)) |
1574 | goto out; | 1579 | goto out; |
1575 | 1580 | ||