diff --git a/include/net/gre.h b/include/net/gre.h index 4e209708b754..ced12aa787d0 100644 --- a/include/net/gre.h +++ b/include/net/gre.h @@ -134,12 +134,12 @@ static inline void gre_build_header(struct sk_buff *skb, int hdr_len, if (flags & TUNNEL_CSUM && !(skb_shinfo(skb)->gso_type & (SKB_GSO_GRE | SKB_GSO_GRE_CSUM))) { + skb->csum_start = skb_transport_header(skb) - skb->head; *ptr = 0; if (skb->ip_summed == CHECKSUM_PARTIAL) { *(__sum16 *)ptr = csum_fold(lco_csum(skb)); } else { skb->ip_summed = CHECKSUM_PARTIAL; - skb->csum_start = skb_transport_header(skb) - skb->head; skb->csum_offset = sizeof(*greh); } }