From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7944E327BEC; Wed, 30 Sep 2026 18:54:35 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1790794476; cv=none; b=Dt5kNAWePofyrSkQRtIHoxaeZNGCilE7zab7HpZc+hyvnq1eJPRPLrkG39HTBOWv09IjpPyi4wcYImBL8PpCNAUC6GbhwwQVJ8ipItO3W2oK3edM3Or/kAXCshISDt7z/NjLhB80Y+DAJqi3pOqO5cQcMZdjuHn4mthsfk5dYEg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1790794476; c=relaxed/simple; bh=PJNwpmUWysOPOKV3uxiyJHTWnhGUeWX0/3UZuAx4GSQ=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=T8VfaALEhsX+Hu5yZev4FsLnKuPwESxxRVu0FBKTWv2Avf72bjnw7PtYSHV6EvH2tU2IuG0yigRpS/qhmzMiS8byIo3qsLBUlukoTIlraxNIIK6RzG6PrB/Swg9tnIU2ggX25iQAn3QPNnqu7Z1VMEkl/kVWDHgyJ/7ko3BZJLE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=A5Sfd6bY; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="A5Sfd6bY" Received: by smtp.kernel.org (Postfix) with ESMTPSA id D58861F000FF; Wed, 30 Sep 2026 18:54:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1790794475; bh=hXdvr97DmMe01LiiYYZIzZdDRgpNan8BwcyHtojKfSM=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=A5Sfd6bYl3PYC4axXJt6fkt2qNhyw2qQdiFRvt4r+JXSeyBPxoZDcQzDY4sxnucNw gMERvUiaWRAu378dUpNxYP/QezfPxcIdVNBtfYgFUH9sYrbcH40A4HIILlxIXaniA9 TWzU1RFg38Mgsd/asRXA1k7G15SQw6PNMyp6D30U= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Alice Mikityanska , Davide Caratti , Willem de Bruijn , Paolo Abeni , Sasha Levin Subject: [PATCH 6.6 0223/1193] net/sched: act_csum: dont mangle UDP tunnel GSO packets Date: Wed, 30 Sep 2026 17:15:07 +0200 Message-ID: <20260930152439.150946716@linuxfoundation.org> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20260930152434.301151190@linuxfoundation.org> References: <20260930152434.301151190@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.6-stable review patch. If anyone has any objections, please let me know. ------------------ From: Alice Mikityanska [ Upstream commit 9bcb30b389ec5888590cb6ec58c7a3b80fe49a11 ] Similar to commit add641e7dee3 ("sched: act_csum: don't mangle TCP and UDP GSO packets"), UDP tunnel GSO packets going through act_csum shouldn't have their checksum calculated at this point, because it will be done after segmentation. Setting the checksum in act_csum modifies skb->ip_summed and prevents inner IP csum offload from kicking in, resulting in a packet with a bad checksum. Add UDP tunnel GSO packets to the exceptions, and also add UDP GSO (SKB_GSO_UDP_L4), as the same logic as in the commit mentioned above applies to UDP GSO too. Signed-off-by: Alice Mikityanska Reviewed-by: Davide Caratti Reviewed-by: Willem de Bruijn Link: https://patch.msgid.link/20260611192955.604661-2-alice.kernel@fastmail.im Signed-off-by: Paolo Abeni Signed-off-by: Sasha Levin --- net/sched/act_csum.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/net/sched/act_csum.c b/net/sched/act_csum.c index e8583dc721b6a..67d82dd72fddf 100644 --- a/net/sched/act_csum.c +++ b/net/sched/act_csum.c @@ -258,7 +258,9 @@ static int tcf_csum_ipv4_udp(struct sk_buff *skb, unsigned int ihl, const struct iphdr *iph; u16 ul; - if (skb_is_gso(skb) && skb_shinfo(skb)->gso_type & SKB_GSO_UDP) + if (skb_is_gso(skb) && skb_shinfo(skb)->gso_type & + (SKB_GSO_UDP | SKB_GSO_UDP_L4 | + SKB_GSO_UDP_TUNNEL | SKB_GSO_UDP_TUNNEL_CSUM)) return 1; /* @@ -314,7 +316,9 @@ static int tcf_csum_ipv6_udp(struct sk_buff *skb, unsigned int ihl, const struct ipv6hdr *ip6h; u16 ul; - if (skb_is_gso(skb) && skb_shinfo(skb)->gso_type & SKB_GSO_UDP) + if (skb_is_gso(skb) && skb_shinfo(skb)->gso_type & + (SKB_GSO_UDP | SKB_GSO_UDP_L4 | + SKB_GSO_UDP_TUNNEL | SKB_GSO_UDP_TUNNEL_CSUM)) return 1; /* -- 2.53.0