From e0efaf77b01720d58f92a51265857c62d64c1d8c Mon Sep 17 00:00:00 2001 From: Richard Fuchs Date: Wed, 27 Mar 2024 11:09:08 -0400 Subject: [PATCH] MT#55283 fix UDP hardware checksumming skb->csum and skb->csum_{start,offset} are actually in a union. Fix copy/pasto in IPv4 code path. Change-Id: I84c498f191d1fc22b987da357e068b9e2f615297 --- kernel-module/xt_RTPENGINE.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/kernel-module/xt_RTPENGINE.c b/kernel-module/xt_RTPENGINE.c index 7bd4fc9e5c..2bc25e9797 100644 --- a/kernel-module/xt_RTPENGINE.c +++ b/kernel-module/xt_RTPENGINE.c @@ -3937,10 +3937,7 @@ static int send_proxy_packet4(struct sk_buff *skb, struct re_address *src, struc goto drop; skb->dev = skb_dst(skb)->dev; - skb->csum_start = skb_transport_header(skb) - skb->head; - skb->csum_offset = offsetof(struct udphdr, check); - - if (skb->dev->features & (NETIF_F_HW_CSUM | NETIF_F_IPV6_CSUM)) { + if (skb->dev->features & (NETIF_F_HW_CSUM | NETIF_F_IP_CSUM)) { skb->ip_summed = CHECKSUM_PARTIAL; skb->csum = 0; udp4_hwcsum(skb, ih->saddr, ih->daddr); @@ -4037,7 +4034,6 @@ static int send_proxy_packet6(struct sk_buff *skb, struct re_address *src, struc if (skb->dev->features & (NETIF_F_HW_CSUM | NETIF_F_IPV6_CSUM)) { skb->ip_summed = CHECKSUM_PARTIAL; - skb->csum = 0; uh->check = ~csum_ipv6_magic(&ih->saddr, &ih->daddr, datalen, IPPROTO_UDP, 0); } else {