From: Pablo Neira Ayuso <pablo@netfilter.org>
To: allfox wy <allfoxwy@gmail.com>
Cc: Florian Westphal <fw@strlen.de>, netfilter@vger.kernel.org
Subject: Re: [regression] Completely editing packet should be allowed.
Date: Mon, 9 Nov 2026 11:25:34 +0100 [thread overview]
Message-ID: <avGfnpl1U8oFlEZG@chamomile> (raw)
In-Reply-To: <CAPH4NY1NhxqqEbf8Ky+AaA561a0x6fDB3cS27FbVizx9ybm21w@mail.gmail.com>
On Sat, Nov 07, 2026 at 04:04:49PM +0800, allfox wy wrote:
> Thank you for explanation. I did a test. It is indeed the protocol
> number change in homebrew causing the block.
>
> However, calling nf_reset_ct(e->skb) would still result in packet
> being dropped. I didn't do a precise diagnose to find out where it got
> dropped. But replacing nf_reset_ct(e->skb) with "return true" would
> result in a working system.
>
> My deduction: in the system's NAT table there is MASQUERADE in
> POSTROUTING. As my understanding, MASQUERADE requires CONNTRACK
> information to work. When the outgoing packet going through MANGLE
> table and got nf_reset_ct(e->skb), later MASQUERADE in NAT table might
> dropped it.
>
> Is there a function that recalculate the CONNTRACK info rather than
> deleting it please?
That would entirely conntrack lookup.
I think your software should be doing this packet mangling from the
prerouting hook *before* the conntrack hook, so you have a chance to
create a conntrack object that really represents the flows after your
mangling.
next prev parent reply other threads:[~2026-11-09 10:25 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-05 19:02 [regression] Completely editing packet should be allowed allfox wy
2026-11-06 5:08 ` Florian Westphal
2026-11-06 11:46 ` Pablo Neira Ayuso
2026-11-07 8:04 ` allfox wy
2026-11-07 8:10 ` allfox wy
2026-11-09 10:25 ` Pablo Neira Ayuso [this message]
2026-11-09 10:49 ` Pablo Neira Ayuso
2026-11-09 14:19 ` Florian Westphal
2026-11-09 15:45 ` allfox wy
2026-11-09 16:19 ` Florian Westphal
2026-11-09 16:44 ` allfox wy
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=avGfnpl1U8oFlEZG@chamomile \
--to=pablo@netfilter.org \
--cc=allfoxwy@gmail.com \
--cc=fw@strlen.de \
--cc=netfilter@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