[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20251014114334.4167561-1-a.melnychenko@vyos.io>
Date: Tue, 14 Oct 2025 13:43:34 +0200
From: Andrii Melnychenko <a.melnychenko@...s.io>
To: pablo@...filter.org,
kadlec@...filter.org,
fw@...len.de,
phil@....cc
Cc: davem@...emloft.net,
edumazet@...gle.com,
kuba@...nel.org,
pabeni@...hat.com,
horms@...nel.org,
netfilter-devel@...r.kernel.org,
coreteam@...filter.org,
netdev@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: [PATCH 1/1] netfilter: Added nfct_seqadj_ext_add() for ftp's conntrack.
There was an issue with NAT'ed ftp and replaced messages
for PASV/EPSV mode. "New" IP in the message may have a
different length that would require sequence adjustment.
Signed-off-by: Andrii Melnychenko <a.melnychenko@...s.io>
---
net/netfilter/nf_conntrack_ftp.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/net/netfilter/nf_conntrack_ftp.c b/net/netfilter/nf_conntrack_ftp.c
index 617f744a2..555ff77f4 100644
--- a/net/netfilter/nf_conntrack_ftp.c
+++ b/net/netfilter/nf_conntrack_ftp.c
@@ -390,6 +390,8 @@ static int help(struct sk_buff *skb,
/* Until there's been traffic both ways, don't look in packets. */
if (ctinfo != IP_CT_ESTABLISHED &&
ctinfo != IP_CT_ESTABLISHED_REPLY) {
+ if (!nf_ct_is_confirmed(ct))
+ nfct_seqadj_ext_add(ct);
pr_debug("ftp: Conntrackinfo = %u\n", ctinfo);
return NF_ACCEPT;
}
--
2.43.0
Powered by blists - more mailing lists