macsec: fix checksumming after decryption [Linux 4.9.187]

This Linux kernel change "macsec: fix checksumming after decryption" is included in the Linux 4.9.187 release. This change is authored by Andreas Steinmetz <ast [at] domdv.de> on Sun Jun 30 22:46:45 2019 +0200. The commit for this change in Linux stable tree is bca7b79 (patch) which is from upstream commit 7d8b16b. The same Linux upstream change may have been applied to various maintained Linux releases and you can find all Linux releases containing changes from upstream 7d8b16b.

macsec: fix checksumming after decryption

[ Upstream commit 7d8b16b9facb0dd81d1469808dd9a575fa1d525a ]

Fix checksumming after decryption.

Signed-off-by: Andreas Steinmetz <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>

There is one line of Linux source code added/deleted in this change. Code changes to Linux kernel are as follows.

 drivers/net/macsec.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/net/macsec.c b/drivers/net/macsec.c
index 70ca128..d91f020 100644
--- a/drivers/net/macsec.c
+++ b/drivers/net/macsec.c
@@ -867,6 +867,7 @@ static void macsec_reset_skb(struct sk_buff *skb, struct net_device *dev)

 static void macsec_finalize_skb(struct sk_buff *skb, u8 icv_len, u8 hdr_len)
 {
+   skb->ip_summed = CHECKSUM_NONE;
    memmove(skb->data + hdr_len, skb->data, 2 * ETH_ALEN);
    skb_pull(skb, hdr_len);
    pskb_trim_unique(skb, skb->len - icv_len);

Leave a Reply

Your email address will not be published. Required fields are marked *