From: Pablo Neira Ayuso <pablo@netfilter.org>
To: Theodor Arsenij Larionov-Trichkine <theodorlarionov@gmail.com>
Cc: Julian Anastasov <ja@ssi.bg>, Simon Horman <horms@verge.net.au>,
Florian Westphal <fw@strlen.de>, Phil Sutter <phil@nwl.cc>,
lvs-devel@vger.kernel.org, netfilter-devel@vger.kernel.org,
netdev@vger.kernel.org, coreteam@netfilter.org
Subject: Re: [PATCH nf v3] ipvs: ftp: do not link expectations to unconfirmed conntracks
Date: Mon, 16 Nov 2026 12:17:40 +0100 [thread overview]
Message-ID: <avrmVAE_onAH-_VK@chamomile> (raw)
In-Reply-To: <CAEZyMPB+oNBrnxV09Ji-Ao7Bcs93Qg=qx0B_b=3ULFx3nEFo+Q@mail.gmail.com>
On Mon, Nov 16, 2026 at 02:05:52PM +0300, Theodor Arsenij Larionov-Trichkine wrote:
> On Mon, Nov 16, 2026 at 1:51 PM Pablo Neira Ayuso <pablo@netfilter.org> wrote:
> > I think this is coming a bit late?
> >
> > Maybe it is possible to check this earlier in this path?
>
> You mean returning at the top of ip_vs_ftp_out() if the ct is not
> confirmed, and letting the packet through untouched? Or even before
> ip_vs_ftp_out() gets called?
diff --git a/net/netfilter/ipvs/ip_vs_ftp.c b/net/netfilter/ipvs/ip_vs_ftp.c
index 9e3e005a8263..5d7b572961f9 100644
--- a/net/netfilter/ipvs/ip_vs_ftp.c
+++ b/net/netfilter/ipvs/ip_vs_ftp.c
@@ -368,7 +368,7 @@ static int ip_vs_ftp_out(struct ip_vs_app *app, struct ip_vs_conn *cp,
buf_len = strlen(buf);
ct = nf_ct_get(skb, &ctinfo);
- if (ct) {
+ if (ct && !nf_ct_unconfirmed(ct)) {
bool mangled;
/* If mangling fails this function will return 0
IIRC, there is a recent fix here to ignore template conntracks too
here.
@Julian, is it worth all the pattern matching before getting here
worth if the ct is unconfirmed? Otherwise, this can be short-circuit
earlier.
prev parent reply other threads:[~2026-11-16 11:17 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-16 10:15 [PATCH nf v3] ipvs: ftp: do not link expectations to unconfirmed conntracks Theodor Arsenij Larionov Trichkine
2026-11-16 10:51 ` Pablo Neira Ayuso
2026-11-16 11:05 ` Theodor Arsenij Larionov-Trichkine
2026-11-16 11:17 ` Pablo Neira Ayuso [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=avrmVAE_onAH-_VK@chamomile \
--to=pablo@netfilter.org \
--cc=coreteam@netfilter.org \
--cc=fw@strlen.de \
--cc=horms@verge.net.au \
--cc=ja@ssi.bg \
--cc=lvs-devel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=netfilter-devel@vger.kernel.org \
--cc=phil@nwl.cc \
--cc=theodorlarionov@gmail.com \
/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