===== include/net/dst.h 1.25 vs edited ===== --- 1.25/include/net/dst.h 2005-02-06 14:23:59 +11:00 +++ edited/include/net/dst.h 2005-02-16 21:29:56 +11:00 @@ -123,6 +123,16 @@ return mtu; } +static inline u32 dst_mtu(const struct dst_entry *dst) +{ + u32 mtu = dst_metric(dst, RTAX_MTU); + /* + * Alexey put it here, so ask him about it :) + */ + barrier(); + return mtu; +} + static inline int dst_metric_locked(struct dst_entry *dst, int metric) { ===== net/ipv4/xfrm4_output.c 1.5 vs edited ===== --- 1.5/net/ipv4/xfrm4_output.c 2004-10-26 09:10:25 +10:00 +++ edited/net/ipv4/xfrm4_output.c 2005-02-16 21:31:32 +11:00 @@ -82,7 +82,7 @@ goto out; dst = skb->dst; - mtu = dst_pmtu(dst) - dst->header_len - dst->trailer_len; + mtu = dst_mtu(dst); if (skb->len > mtu) { icmp_send(skb, ICMP_DEST_UNREACH, ICMP_FRAG_NEEDED, htonl(mtu)); ret = -EMSGSIZE; ===== net/ipv6/xfrm6_output.c 1.7 vs edited ===== --- 1.7/net/ipv6/xfrm6_output.c 2004-11-16 13:52:34 +11:00 +++ edited/net/ipv6/xfrm6_output.c 2005-02-16 21:31:46 +11:00 @@ -79,7 +79,7 @@ int mtu, ret = 0; struct dst_entry *dst = skb->dst; - mtu = dst_pmtu(dst) - dst->header_len - dst->trailer_len; + mtu = dst_mtu(dst); if (mtu < IPV6_MIN_MTU) mtu = IPV6_MIN_MTU;