Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 7f92d334 authored by Steffen Klassert's avatar Steffen Klassert Committed by David S. Miller
Browse files

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: default avatarSteffen Klassert <steffen.klassert@secunet.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent d851c12b
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -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;