]> git.hungrycats.org Git - linux/commitdiff
ipv4: Don't increase PMTU with Datagram Too Big message.
authorLi Wei <lw@cn.fujitsu.com>
Thu, 29 Jan 2015 08:09:03 +0000 (16:09 +0800)
committerJiri Slaby <jslaby@suse.cz>
Sat, 9 Jan 2016 10:32:06 +0000 (11:32 +0100)
commit 3cdaa5be9e81a914e633a6be7b7d2ef75b528562 upstream.

RFC 1191 said, "a host MUST not increase its estimate of the Path
MTU in response to the contents of a Datagram Too Big message."

Signed-off-by: Li Wei <lw@cn.fujitsu.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
net/ipv4/route.c

index bd5f3461d1ce36292c4101c99ef9c0d24a9bf73b..fe0c761a8fce2ada77c0fc00148d3f265416b39b 100644 (file)
@@ -988,6 +988,9 @@ static void __ip_rt_update_pmtu(struct rtable *rt, struct flowi4 *fl4, u32 mtu)
        if (dst->dev->mtu < mtu)
                return;
 
+       if (rt->rt_pmtu && rt->rt_pmtu < mtu)
+               return;
+
        if (mtu < ip_rt_min_pmtu)
                mtu = ip_rt_min_pmtu;