From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.linuxfoundation.org ([140.211.169.12]:42999 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753505AbbD2KM0 (ORCPT ); Wed, 29 Apr 2015 06:12:26 -0400 Subject: Patch "net: add skb_checksum_complete_unset" has been added to the 4.0-stable tree To: tom@herbertland.com, davem@davemloft.net, gregkh@linuxfoundation.org Cc: , From: Date: Wed, 29 Apr 2015 12:12:19 +0200 Message-ID: <1430302339221216@kroah.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ANSI_X3.4-1968 Content-Transfer-Encoding: 8bit Sender: stable-owner@vger.kernel.org List-ID: This is a note to let you know that I've just added the patch titled net: add skb_checksum_complete_unset to the 4.0-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: net-add-skb_checksum_complete_unset.patch and it can be found in the queue-4.0 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let know about it. >>From foo@baz Wed Apr 29 11:59:49 CEST 2015 From: Tom Herbert Date: Mon, 20 Apr 2015 14:10:04 -0700 Subject: net: add skb_checksum_complete_unset From: Tom Herbert [ Upstream commit 4e18b9adf2f910ec4d30b811a74a5b626e6c6125 ] This function changes ip_summed to CHECKSUM_NONE if CHECKSUM_COMPLETE is set. This is called to discard checksum-complete when packet is being modified and checksum is not pulled for headers in a layer. Signed-off-by: Tom Herbert Signed-off-by: David S. Miller Signed-off-by: Greg Kroah-Hartman --- include/linux/skbuff.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) --- a/include/linux/skbuff.h +++ b/include/linux/skbuff.h @@ -3013,6 +3013,18 @@ static inline bool __skb_checksum_valida */ #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: Patches currently in stable-queue which might be from tom@herbertland.com are queue-4.0/net-rfs-fix-crash-in-get_rps_cpus.patch queue-4.0/ppp-call-skb_checksum_complete_unset-in-ppp_receive_frame.patch queue-4.0/net-add-skb_checksum_complete_unset.patch