Commit d1510eda authored by Shirley Ma's avatar Shirley Ma Committed by Dmitry Torokhov

[IPV6]: Fix pmtu check conditions in two spots.

parent fb8c2688
......@@ -554,6 +554,8 @@ static void ip6_rt_update_pmtu(struct dst_entry *dst, u32 mtu)
if (mtu < dst_pmtu(dst) && rt6->rt6i_dst.plen == 128) {
rt6->rt6i_flags |= RTF_MODIFIED;
if (mtu < IPV6_MIN_MTU)
mtu = IPV6_MIN_MTU;
dst->metrics[RTAX_MTU-1] = mtu;
}
}
......
......@@ -236,10 +236,10 @@ static void xfrm6_update_pmtu(struct dst_entry *dst, u32 mtu)
{
struct dst_entry *path = dst->path;
if (mtu >= 1280 && mtu < dst_pmtu(dst))
return;
path->ops->update_pmtu(path, mtu);
if (mtu >= IPV6_MIN_MTU && mtu < dst_pmtu(dst))
path->ops->update_pmtu(path, mtu);
return;
}
struct dst_ops xfrm6_dst_ops = {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment