diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h index 85ab7d72b54c2f269812015b19544674bc6dcd72..00e0ab9e0ac70a343401104dfcf94336ca3ec786 100644 --- a/include/linux/skbuff.h +++ b/include/linux/skbuff.h @@ -2998,6 +2998,18 @@ static inline bool __skb_checksum_validate_needed(struct sk_buff *skb, */ #define CHECKSUM_BREAK 76 +/* Unset checksum-complete + * + * Unset checksum complete can be done when packet is being modified + * (uncompressed for instance) and checksum-complete value is + * invalidated. + */ +static inline void skb_checksum_complete_unset(struct sk_buff *skb) +{ + if (skb->ip_summed == CHECKSUM_COMPLETE) + skb->ip_summed = CHECKSUM_NONE; +} + /* Validate (init) checksum based on checksum complete. * * Return values: