From: Sasha Levin <sashal@kernel.org>
To: stable@vger.kernel.org
Cc: Ilya Maximets <i.maximets@ovn.org>,
Aaron Conole <aconole@redhat.com>,
Xin Long <lucien.xin@gmail.com>,
Jamal Hadi Salim <jhs@mojatatu.com>,
Jakub Kicinski <kuba@kernel.org>, Sasha Levin <sashal@kernel.org>
Subject: [PATCH 6.6.y 2/2] net/sched: act_ct: remove 'add_helper' dead code
Date: Tue, 29 Sep 2026 22:34:06 -0400 [thread overview]
Message-ID: <20260930023406.3421456-2-sashal@kernel.org> (raw)
In-Reply-To: <20260930023406.3421456-1-sashal@kernel.org>
From: Ilya Maximets <i.maximets@ovn.org>
[ Upstream commit 00df72e39f306e2f7adb68528a5c92109da6a0a9 ]
This variable can only become 'true' when the connection is not
confirmed, but it is only checked when it is confirmed. So, it can be
treated as being always false and just removed.
Fixes: a21b06e73191 ("net: sched: add helper support in act_ct")
Cc: stable@vger.kernel.org
Signed-off-by: Ilya Maximets <i.maximets@ovn.org>
Reviewed-by: Aaron Conole <aconole@redhat.com>
Reviewed-by: Xin Long <lucien.xin@gmail.com>
Reviewed-by: Jamal Hadi Salim <jhs@mojatatu.com>
Link: https://patch.msgid.link/20260921145655.3167436-6-i.maximets@ovn.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
[ adjusted context to preserve the direct NAT flag check and goto drop error handling. ]
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
net/sched/act_ct.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/net/sched/act_ct.c b/net/sched/act_ct.c
index 7a0dff24c5d15..bdffceeb4f34d 100644
--- a/net/sched/act_ct.c
+++ b/net/sched/act_ct.c
@@ -981,7 +981,6 @@ TC_INDIRECT_SCOPE int tcf_ct_act(struct sk_buff *skb, const struct tc_action *a,
bool cached, commit, clear;
int nh_ofs, err, retval;
struct tcf_ct_params *p;
- bool add_helper = false;
bool skb_is_ours = false;
bool skip_add = false;
bool defrag = false;
@@ -1077,14 +1076,14 @@ TC_INDIRECT_SCOPE int tcf_ct_act(struct sk_buff *skb, const struct tc_action *a,
err = __nf_ct_try_assign_helper(ct, p->tmpl, GFP_ATOMIC);
if (err)
goto drop;
- add_helper = true;
+
if (p->ct_action & TCA_CT_ACT_NAT && !nfct_seqadj(ct)) {
if (!nfct_seqadj_ext_add(ct))
goto drop;
}
}
- if (nf_ct_is_confirmed(ct) ? ((!cached && !skip_add) || add_helper) : commit) {
+ if (nf_ct_is_confirmed(ct) ? (!cached && !skip_add) : commit) {
if (nf_ct_helper(skb, ct, ctinfo, family) != NF_ACCEPT)
goto drop;
}
--
2.53.0
prev parent reply other threads:[~2026-09-30 2:34 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-29 9:10 FAILED: patch "[PATCH] net/sched: act_ct: remove 'add_helper' dead code" failed to apply to 6.6-stable tree gregkh
2026-09-30 2:34 ` [PATCH 6.6.y 1/2] net: openvswitch: conntrack: avoid modifying shared unconfirmed ct entry Sasha Levin
2026-09-30 2:34 ` Sasha Levin [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260930023406.3421456-2-sashal@kernel.org \
--to=sashal@kernel.org \
--cc=aconole@redhat.com \
--cc=i.maximets@ovn.org \
--cc=jhs@mojatatu.com \
--cc=kuba@kernel.org \
--cc=lucien.xin@gmail.com \
--cc=stable@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox