Patch "packet: do not set TP_STATUS_CSUM_VALID on CHECKSUM_COMPLETE" has been added to the 5.10-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

    packet: do not set TP_STATUS_CSUM_VALID on CHECKSUM_COMPLETE

to the 5.10-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:
     packet-do-not-set-tp_status_csum_valid-on-checksum_c.patch
and it can be found in the queue-5.10 subdirectory.

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



commit d23bfa02572bc72b0fb359cfcd33ad83b57de280
Author: Willem de Bruijn <willemb@xxxxxxxxxx>
Date:   Mon Nov 28 11:18:12 2022 -0500

    packet: do not set TP_STATUS_CSUM_VALID on CHECKSUM_COMPLETE
    
    [ Upstream commit b85f628aa158a653c006e9c1405a117baef8c868 ]
    
    CHECKSUM_COMPLETE signals that skb->csum stores the sum over the
    entire packet. It does not imply that an embedded l4 checksum
    field has been validated.
    
    Fixes: 682f048bd494 ("af_packet: pass checksum validation status to the user")
    Signed-off-by: Willem de Bruijn <willemb@xxxxxxxxxx>
    Link: https://lore.kernel.org/r/20221128161812.640098-1-willemdebruijn.kernel@xxxxxxxxx
    Signed-off-by: Jakub Kicinski <kuba@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/net/packet/af_packet.c b/net/packet/af_packet.c
index b70b06e312bd..eaa030e2ad55 100644
--- a/net/packet/af_packet.c
+++ b/net/packet/af_packet.c
@@ -2243,8 +2243,7 @@ static int tpacket_rcv(struct sk_buff *skb, struct net_device *dev,
 	if (skb->ip_summed == CHECKSUM_PARTIAL)
 		status |= TP_STATUS_CSUMNOTREADY;
 	else if (skb->pkt_type != PACKET_OUTGOING &&
-		 (skb->ip_summed == CHECKSUM_COMPLETE ||
-		  skb_csum_unnecessary(skb)))
+		 skb_csum_unnecessary(skb))
 		status |= TP_STATUS_CSUM_VALID;
 
 	if (snaplen > res)
@@ -3480,8 +3479,7 @@ static int packet_recvmsg(struct socket *sock, struct msghdr *msg, size_t len,
 		if (skb->ip_summed == CHECKSUM_PARTIAL)
 			aux.tp_status |= TP_STATUS_CSUMNOTREADY;
 		else if (skb->pkt_type != PACKET_OUTGOING &&
-			 (skb->ip_summed == CHECKSUM_COMPLETE ||
-			  skb_csum_unnecessary(skb)))
+			 skb_csum_unnecessary(skb))
 			aux.tp_status |= TP_STATUS_CSUM_VALID;
 
 		aux.tp_len = origlen;



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux