[ipsec,1/2] xfrm: revert ipv4 mtu determination to dst_mtu

Message ID 20130822195355.GA4784@order.stressinduktion.org
State Not Applicable, archived
Delegated to: David Miller
Headers show

Commit Message

Hannes Frederic Sowa Aug. 22, 2013, 7:53 p.m.
In commit 0ea9d5e3e0e03a63b11392f5613378977dae7eca ("xfrm: introduce
helper for safe determination of mtu") I switched the determination of
ipv4 mtus from dst_mtu to ip_skb_dst_mtu. This was an error because in
case of IP_PMTUDISC_PROBE we fall back to the interface mtu, which is
never correct for ipv4 ipsec.

Cc: Steffen Klassert <steffen.klassert@secunet.com>
Signed-off-by: Hannes Frederic Sowa <hannes@stressinduktion.org>
 include/net/xfrm.h | 2 --
 1 file changed, 2 deletions(-)


diff --git a/include/net/xfrm.h b/include/net/xfrm.h
index ac5b025..65d3529 100644
--- a/include/net/xfrm.h
+++ b/include/net/xfrm.h
@@ -1730,8 +1730,6 @@  static inline int xfrm_skb_dst_mtu(struct sk_buff *skb)
 	if (sk && skb->protocol == htons(ETH_P_IPV6))
 		return ip6_skb_dst_mtu(skb);
-	else if (sk && skb->protocol == htons(ETH_P_IP))
-		return ip_skb_dst_mtu(skb);
 	return dst_mtu(skb_dst(skb));