Skip to contentSkip to conversation

udpv6: Fix the checksum computation when HW checksum does not apply

PATCH In review Subash Abhinov Kasiviswanathan 2 participants 2 messages Sep 14, 2017 – Sep 18, 2017

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 udpv6: Fix the checksum computation when HW checksum does not apply

While trying an ESP transport mode encryption for UDPv6 packets of datagram size 1436 with MTU 1500, checksum error was observed in the secondary fragment.

This error occurs due to the UDP payload checksum being missed out when computing the full checksum for these packets in udp6_hwcsum_outgoing().

Fixes d39d938c8228 ("ipv6: Introduce udpv6_send_skb()")
---
 net/ipv6/udp.c | 1 +
 1 file changed, 1 insertion(+)
net/ipv6/udp.c +1 -0
index e2ecfb1..40d7234 100644
@@ -1015,6 +1015,7 @@ static void udp6_hwcsum_outgoing(struct sock *sk, struct sk_buff *skb,
 		 */
 		offset = skb_transport_offset(skb);
 		skb->csum = skb_checksum(skb, offset, skb->len - offset, 0);
+		csum = skb->csum;
 
 		skb->ip_summed = CHECKSUM_NONE;
 
Signature · 1 line
1.9.1
maintainer
#1 lore raw

From: Subash Abhinov Kasiviswanathan <[email protected]>
Date: Wed, 13 Sep 2017 19:30:51 -0600

Quoted 10 lines

While trying an ESP transport mode encryption for UDPv6 packets of datagram size 1436 with MTU 1500, checksum error was observed in the secondary fragment.

This error occurs due to the UDP payload checksum being missed out when computing the full checksum for these packets in udp6_hwcsum_outgoing().

Fixes d39d938c8228 ("ipv6: Introduce udpv6_send_skb()")

Good catch, applied and queued up for -stable.