[PATCH net] udpv6: Fix the checksum computation when HW checksum does not apply

Subsystems: networking [general], the rest, user datagram protocol (udp)

STALE3273d

2 messages, 2 authors, 2017-09-18 · open the first message on its own page

[PATCH net] udpv6: Fix the checksum computation when HW checksum does not apply

From: Subash Abhinov Kasiviswanathan <hidden>
Date: 2017-09-14 01:31:04

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()")
Signed-off-by: Subash Abhinov Kasiviswanathan <redacted>
---
 net/ipv6/udp.c | 1 +
 1 file changed, 1 insertion(+)
diff --git a/net/ipv6/udp.c b/net/ipv6/udp.c
index e2ecfb1..40d7234 100644
--- a/net/ipv6/udp.c
+++ b/net/ipv6/udp.c
@@ -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;
 
-- 
1.9.1

Re: [PATCH net] udpv6: Fix the checksum computation when HW checksum does not apply

From: David Miller <davem@davemloft.net>
Date: 2017-09-18 18:43:45

From: Subash Abhinov Kasiviswanathan <redacted>
Date: Wed, 13 Sep 2017 19:30:51 -0600
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()")
Signed-off-by: Subash Abhinov Kasiviswanathan <redacted>
Good catch, applied and queued up for -stable.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help