From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 214C11714D0; Thu, 15 Aug 2024 13:28:36 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1723728516; cv=none; b=gMqJuP1SeZoVthvDpPQLUbJzinV7ex96ylrCwYBN9gaXIN8KOIgephRPUwl5eobcAF/iCIsbnqXB6OAmdCYk13YqI/DcDHNLLrQVCXwKG+kNVXAdmVlXYLPpiIXA01UkB/wbebabvco+keAn9se2f8k35jwJ3cPXzIyRTnhXnnk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1723728516; c=relaxed/simple; bh=FgzHZxmTaj7+VsaMhxyNiMMLm3o+ZMUQcEVh908lCN0=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=SlaLDOXdIUt30ncUpY4nPFbF4tBVCeyKMvZMiWz4e0AI8gN6X+7wtWXFFK/65kvDjunVYa2WAH0HpQ9TkxrEg3GZi8eYQOIKD/7kLfp2VDbLDxaOOFSG/MfeYHEszttJlOlMgL8zTW3vwUg8uWDzjG8U1oidsLkcJVuzl6pK4pk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=yyoxR51K; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="yyoxR51K" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 99677C32786; Thu, 15 Aug 2024 13:28:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1723728516; bh=FgzHZxmTaj7+VsaMhxyNiMMLm3o+ZMUQcEVh908lCN0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=yyoxR51K5nagM/GzLejh0ESdH7SwcTHyd3PRvfpVN9xfsDzN5GQCSdwsMwBBiRXpJ xI+ZzI19rqF4Ow9dofoB98fIPy3tEO/pXEhBhx7k3PERILsIRYLmGRge0OLFB/IOox 8YH6KeG1/x8IHWOXk/rOFQCvOENIpgPc2xTSobJM= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Ismael Luceno , Julian Anastasov , Simon Horman , Pablo Neira Ayuso , Sasha Levin Subject: [PATCH 4.19 025/196] ipvs: Avoid unnecessary calls to skb_is_gso_sctp Date: Thu, 15 Aug 2024 15:22:22 +0200 Message-ID: <20240815131853.050478281@linuxfoundation.org> X-Mailer: git-send-email 2.46.0 In-Reply-To: <20240815131852.063866671@linuxfoundation.org> References: <20240815131852.063866671@linuxfoundation.org> User-Agent: quilt/0.67 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 4.19-stable review patch. If anyone has any objections, please let me know. ------------------ From: Ismael Luceno [ Upstream commit 53796b03295cf7ab1fc8600016fa6dfbf4a494a0 ] In the context of the SCTP SNAT/DNAT handler, these calls can only return true. Fixes: e10d3ba4d434 ("ipvs: Fix checksumming on GSO of SCTP packets") Signed-off-by: Ismael Luceno Acked-by: Julian Anastasov Acked-by: Simon Horman Signed-off-by: Pablo Neira Ayuso Signed-off-by: Sasha Levin --- net/netfilter/ipvs/ip_vs_proto_sctp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/net/netfilter/ipvs/ip_vs_proto_sctp.c b/net/netfilter/ipvs/ip_vs_proto_sctp.c index 18e2e489d0e51..5005469c1732a 100644 --- a/net/netfilter/ipvs/ip_vs_proto_sctp.c +++ b/net/netfilter/ipvs/ip_vs_proto_sctp.c @@ -123,7 +123,7 @@ sctp_snat_handler(struct sk_buff *skb, struct ip_vs_protocol *pp, if (sctph->source != cp->vport || payload_csum || skb->ip_summed == CHECKSUM_PARTIAL) { sctph->source = cp->vport; - if (!skb_is_gso(skb) || !skb_is_gso_sctp(skb)) + if (!skb_is_gso(skb)) sctp_nat_csum(skb, sctph, sctphoff); } else { skb->ip_summed = CHECKSUM_UNNECESSARY; @@ -172,7 +172,7 @@ sctp_dnat_handler(struct sk_buff *skb, struct ip_vs_protocol *pp, (skb->ip_summed == CHECKSUM_PARTIAL && !(skb_dst(skb)->dev->features & NETIF_F_SCTP_CRC))) { sctph->dest = cp->dport; - if (!skb_is_gso(skb) || !skb_is_gso_sctp(skb)) + if (!skb_is_gso(skb)) sctp_nat_csum(skb, sctph, sctphoff); } else if (skb->ip_summed != CHECKSUM_PARTIAL) { skb->ip_summed = CHECKSUM_UNNECESSARY; -- 2.43.0