netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net] udpv6: Fix the checksum computation when HW checksum does not apply
@ 2017-09-14  1:30 Subash Abhinov Kasiviswanathan
  2017-09-18 18:43 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Subash Abhinov Kasiviswanathan @ 2017-09-14  1:30 UTC (permalink / raw)
  To: netdev, vyasevic; +Cc: Subash Abhinov Kasiviswanathan

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 <subashab@codeaurora.org>
---
 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

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH net] udpv6: Fix the checksum computation when HW checksum does not apply
  2017-09-14  1:30 [PATCH net] udpv6: Fix the checksum computation when HW checksum does not apply Subash Abhinov Kasiviswanathan
@ 2017-09-18 18:43 ` David Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2017-09-18 18:43 UTC (permalink / raw)
  To: subashab; +Cc: netdev, vyasevic

From: Subash Abhinov Kasiviswanathan <subashab@codeaurora.org>
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 <subashab@codeaurora.org>

Good catch, applied and queued up for -stable.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-09-18 18:43 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-09-14  1:30 [PATCH net] udpv6: Fix the checksum computation when HW checksum does not apply Subash Abhinov Kasiviswanathan
2017-09-18 18:43 ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).