Skip to contentSkip to conversation

Patch "net: add skb_checksum_complete_unset" has been added to the 3.19-stable tree

PATCH [email protected] 1 participant 1 message Apr 29, 2015

Subsystems (2)
lore
Share & tools
lore

[email protected]

author maintainer Applied
#0 lore raw

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 <[email protected]> know about it.

Quoted 1 line

From foo@baz Wed Apr 29 12:00:18 CEST 2015

From: Tom Herbert <[email protected]>
Date: Mon, 20 Apr 2015 14:10:04 -0700
Subject: net: add skb_checksum_complete_unset

From: Tom Herbert <[email protected]>

[ 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.

---
 include/linux/skbuff.h |   12 ++++++++++++
 1 file changed, 12 insertions(+)
include/linux/skbuff.h +12 -0
@@ -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 [email protected] 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