]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blob - releases/4.13.6/udpv6-fix-the-checksum-computation-when-hw-checksum-does-not-apply.patch
fixes for 4.19
[thirdparty/kernel/stable-queue.git] / releases / 4.13.6 / udpv6-fix-the-checksum-computation-when-hw-checksum-does-not-apply.patch
1 From foo@baz Mon Oct 9 09:32:35 CEST 2017
2 From: Subash Abhinov Kasiviswanathan <subashab@codeaurora.org>
3 Date: Wed, 13 Sep 2017 19:30:51 -0600
4 Subject: udpv6: Fix the checksum computation when HW checksum does not apply
5
6 From: Subash Abhinov Kasiviswanathan <subashab@codeaurora.org>
7
8
9 [ Upstream commit 63ecc3d9436f8012e49dc846d6cb0a85a3433517 ]
10
11 While trying an ESP transport mode encryption for UDPv6 packets of
12 datagram size 1436 with MTU 1500, checksum error was observed in
13 the secondary fragment.
14
15 This error occurs due to the UDP payload checksum being missed out
16 when computing the full checksum for these packets in
17 udp6_hwcsum_outgoing().
18
19 Fixes: d39d938c8228 ("ipv6: Introduce udpv6_send_skb()")
20 Signed-off-by: Subash Abhinov Kasiviswanathan <subashab@codeaurora.org>
21 Signed-off-by: David S. Miller <davem@davemloft.net>
22 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
23 ---
24 net/ipv6/udp.c | 1 +
25 1 file changed, 1 insertion(+)
26
27 --- a/net/ipv6/udp.c
28 +++ b/net/ipv6/udp.c
29 @@ -1011,6 +1011,7 @@ static void udp6_hwcsum_outgoing(struct
30 */
31 offset = skb_transport_offset(skb);
32 skb->csum = skb_checksum(skb, offset, skb->len - offset, 0);
33 + csum = skb->csum;
34
35 skb->ip_summed = CHECKSUM_NONE;
36