diff options
author | Steffen Klassert <steffen.klassert@secunet.com> | 2012-10-07 18:48:18 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-10-08 14:46:35 -0400 |
commit | 7f92d334ba19a0d8e96f8f8f092219553367d921 (patch) | |
tree | 61974ee8b7c5b0428401e29836ce2cc1bbc9484e /net/ipv4 | |
parent | d851c12b60471188e15e5c8405b289073e8dd025 (diff) |
ipv4: Don't create nh exeption when the device mtu is smaller than the reported pmtu
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 <steffen.klassert@secunet.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4')
-rw-r--r-- | net/ipv4/route.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/net/ipv4/route.c b/net/ipv4/route.c index 90ba8358a892..741df67a81ec 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) | |||
909 | struct dst_entry *dst = &rt->dst; | 909 | struct dst_entry *dst = &rt->dst; |
910 | struct fib_result res; | 910 | struct fib_result res; |
911 | 911 | ||
912 | if (dst->dev->mtu < mtu) | ||
913 | return; | ||
914 | |||
912 | if (mtu < ip_rt_min_pmtu) | 915 | if (mtu < ip_rt_min_pmtu) |
913 | mtu = ip_rt_min_pmtu; | 916 | mtu = ip_rt_min_pmtu; |
914 | 917 | ||