Commit a6aad08c authored by David S. Miller's avatar David S. Miller

[IPV4]: Use dst_pmtu not dev->mtu to determine if fragmentation is needed.

parent 01db66c4
......@@ -263,7 +263,7 @@ int ip_mc_output(struct sk_buff *skb)
newskb->dev, ip_dev_loopback_xmit);
}
if (skb->len > dev->mtu || skb_shinfo(skb)->frag_list)
if (skb->len > dst_pmtu(&rt->u.dst) || skb_shinfo(skb)->frag_list)
return ip_fragment(skb, ip_finish_output);
else
return ip_finish_output(skb);
......@@ -273,7 +273,7 @@ int ip_output(struct sk_buff *skb)
{
IP_INC_STATS(IpOutRequests);
if ((skb->len > skb->dst->dev->mtu || skb_shinfo(skb)->frag_list) &&
if ((skb->len > dst_pmtu(skb->dst) || skb_shinfo(skb)->frag_list) &&
!skb_shinfo(skb)->tso_size)
return ip_fragment(skb, ip_finish_output);
else
......
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