diff options
author | Xin Long <lucien.xin@gmail.com> | 2016-10-28 10:18:01 (GMT) |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2016-10-31 18:24:24 (GMT) |
commit | 19bda36c4299ce3d7e5bce10bebe01764a655a6d (patch) | |
tree | 813a1c2297d879c1cefad077e231aa6a380f4ae7 /net/ipv6 | |
parent | f89c56ce710afa65e1b2ead555b52c4807f34ff7 (diff) | |
download | linux-19bda36c4299ce3d7e5bce10bebe01764a655a6d.tar.xz |
ipv6: add mtu lock check in __ip6_rt_update_pmtu
Prior to this patch, ipv6 didn't do mtu lock check in ip6_update_pmtu.
It leaded to that mtu lock doesn't really work when receiving the pkt
of ICMPV6_PKT_TOOBIG.
This patch is to add mtu lock check in __ip6_rt_update_pmtu just as ipv4
did in __ip_rt_update_pmtu.
Acked-by: Hannes Frederic Sowa <hannes@stressinduktion.org>
Signed-off-by: Xin Long <lucien.xin@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv6')
-rw-r--r-- | net/ipv6/route.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/net/ipv6/route.c b/net/ipv6/route.c index 947ed1d..7403d90 100644 --- a/net/ipv6/route.c +++ b/net/ipv6/route.c @@ -1364,6 +1364,9 @@ static void __ip6_rt_update_pmtu(struct dst_entry *dst, const struct sock *sk, if (rt6->rt6i_flags & RTF_LOCAL) return; + if (dst_metric_locked(dst, RTAX_MTU)) + return; + dst_confirm(dst); mtu = max_t(u32, mtu, IPV6_MIN_MTU); if (mtu >= dst_mtu(dst)) |