All of lore.kernel.org
 help / color / mirror / Atom feed
* Patch "net: add skb_checksum_complete_unset" has been added to the 3.19-stable tree
@ 2015-04-29 10:11 gregkh
  0 siblings, 0 replies; only message in thread
From: gregkh @ 2015-04-29 10:11 UTC (permalink / raw)
  To: tom, davem, gregkh; +Cc: stable, stable-commits


This is a note to let you know that I've just added the patch titled

    net: add skb_checksum_complete_unset

to the 3.19-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-3.19 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@vger.kernel.org> know about it.


>From foo@baz Wed Apr 29 12:00:18 CEST 2015
From: Tom Herbert <tom@herbertland.com>
Date: Mon, 20 Apr 2015 14:10:04 -0700
Subject: net: add skb_checksum_complete_unset

From: Tom Herbert <tom@herbertland.com>

[ 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 <tom@herbertland.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 include/linux/skbuff.h |   12 ++++++++++++
 1 file changed, 12 insertions(+)

--- a/include/linux/skbuff.h
+++ b/include/linux/skbuff.h
@@ -2998,6 +2998,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-3.19/ppp-call-skb_checksum_complete_unset-in-ppp_receive_frame.patch
queue-3.19/net-add-skb_checksum_complete_unset.patch

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2015-04-29 10:11 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-04-29 10:11 Patch "net: add skb_checksum_complete_unset" has been added to the 3.19-stable tree gregkh

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.