From: Tom Herbert Date: Fri, 3 Oct 2014 22:48:07 +0000 (-0700) Subject: ip_tunnel: Account for secondary encapsulation header in max_headroom X-Git-Tag: v3.18-rc1~115^2~49^2~3 X-Git-Url: https://openfabrics.org/gitweb/?a=commitdiff_plain;h=7371e0221c7721a1486fef745abaa8ae84571621;p=~emulex%2Finfiniband.git ip_tunnel: Account for secondary encapsulation header in max_headroom When adjusting max_header for the tunnel interface based on egress device we need to account for any extra bytes in secondary encapsulation (e.g. FOU). Signed-off-by: Tom Herbert Signed-off-by: David S. Miller --- diff --git a/net/ipv4/ip_tunnel.c b/net/ipv4/ip_tunnel.c index 2272de90c2d..d9c9dc4ffea 100644 --- a/net/ipv4/ip_tunnel.c +++ b/net/ipv4/ip_tunnel.c @@ -759,7 +759,7 @@ void ip_tunnel_xmit(struct sk_buff *skb, struct net_device *dev, df |= (inner_iph->frag_off&htons(IP_DF)); max_headroom = LL_RESERVED_SPACE(rt->dst.dev) + sizeof(struct iphdr) - + rt->dst.header_len; + + rt->dst.header_len + ip_encap_hlen(&tunnel->encap); if (max_headroom > dev->needed_headroom) dev->needed_headroom = max_headroom;