From: Steffen Klassert Date: Sun, 7 Oct 2012 22:48:18 +0000 (+0000) Subject: ipv4: Don't create nh exeption when the device mtu is smaller than the reported pmtu X-Git-Tag: v3.6.4~17 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2db8263a627414aa2f6a60f80ec99178f12f757b;p=thirdparty%2Fkernel%2Fstable.git ipv4: Don't create nh exeption when the device mtu is smaller than the reported pmtu [ Upstream commit 7f92d334ba19a0d8e96f8f8f092219553367d921 ] When a local tool like tracepath tries to send packets bigger than the device mtu, we create a nh exeption and set the pmtu to device mtu. The device mtu does not expire, so check if the device mtu is smaller than the reported pmtu and don't crerate a nh exeption in that case. Signed-off-by: Steffen Klassert Signed-off-by: David S. Miller Signed-off-by: Greg Kroah-Hartman --- diff --git a/net/ipv4/route.c b/net/ipv4/route.c index 09e85c74e872a..11814ad59fa60 100644 --- a/net/ipv4/route.c +++ b/net/ipv4/route.c @@ -909,6 +909,9 @@ static void __ip_rt_update_pmtu(struct rtable *rt, struct flowi4 *fl4, u32 mtu) struct dst_entry *dst = &rt->dst; struct fib_result res; + if (dst->dev->mtu < mtu) + return; + if (mtu < ip_rt_min_pmtu) mtu = ip_rt_min_pmtu;