diff mbox

[bisected] ICMP fragmentation needed ignored / PMTU discovery broken since 3.19-rc7

Message ID 20150428034314.GA30299@gondor.apana.org.au
State Accepted, archived
Delegated to: David Miller
Headers show

Commit Message

Herbert Xu April 28, 2015, 3:43 a.m. UTC
Gerd v. Egidy <gerd.von.egidy@intra2net.com> wrote:
> 
> my colleagues recently reported that they had spurious problems connecting
> to a specific server via ssh. Investigation showed that the kernel completely 
> ignored the ICMP dest. unreachable / fragmentation needed packets in this case:

This patch might help:

---8<---
Subject: route: Use ipv4_mtu instead of raw rt_pmtu

The commit 3cdaa5be9e81a914e633a6be7b7d2ef75b528562 ("ipv4: Don't
increase PMTU with Datagram Too Big message") broke PMTU in cases
where the rt_pmtu value has expired but is smaller than the new
PMTU value.

This obsolete rt_pmtu then prevents the new PMTU value from being
installed.

Fixes: 3cdaa5be9e81 ("ipv4: Don't increase PMTU with Datagram Too Big message")
Reported-by: Gerd v. Egidy <gerd.von.egidy@intra2net.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>

Comments

Gerd v. Egidy April 28, 2015, 8:59 a.m. UTC | #1
Hello Herbert,

> This patch might help:
> 
> ---8<---
> Subject: route: Use ipv4_mtu instead of raw rt_pmtu

thank you very much for looking into this. With your patch applied I was not 
able to reproduce the problem anymore.

Could you take care of getting this into mainline and stable?

Thanks.

Kind regards,

Gerd

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
David Miller April 29, 2015, 6:43 p.m. UTC | #2
From: Herbert Xu <herbert@gondor.apana.org.au>
Date: Tue, 28 Apr 2015 11:43:15 +0800

> Subject: route: Use ipv4_mtu instead of raw rt_pmtu
> 
> The commit 3cdaa5be9e81a914e633a6be7b7d2ef75b528562 ("ipv4: Don't
> increase PMTU with Datagram Too Big message") broke PMTU in cases
> where the rt_pmtu value has expired but is smaller than the new
> PMTU value.
> 
> This obsolete rt_pmtu then prevents the new PMTU value from being
> installed.
> 
> Fixes: 3cdaa5be9e81 ("ipv4: Don't increase PMTU with Datagram Too Big message")
> Reported-by: Gerd v. Egidy <gerd.von.egidy@intra2net.com>
> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>

Applied and queued up for -stable, thanks!
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/net/ipv4/route.c b/net/ipv4/route.c
index a78540f..bff62fc 100644
--- a/net/ipv4/route.c
+++ b/net/ipv4/route.c
@@ -962,10 +962,7 @@  static void __ip_rt_update_pmtu(struct rtable *rt, struct flowi4 *fl4, u32 mtu)
 	if (dst_metric_locked(dst, RTAX_MTU))
 		return;
 
-	if (dst->dev->mtu < mtu)
-		return;
-
-	if (rt->rt_pmtu && rt->rt_pmtu < mtu)
+	if (ipv4_mtu(dst) < mtu)
 		return;
 
 	if (mtu < ip_rt_min_pmtu)