From: Pablo Neira Ayuso <pablo@netfilter.org>
To: Tony He <huangya90@gmail.com>
Cc: netfilter@vger.kernel.org
Subject: Re: Fwd: question about using conntrack to change the mark
Date: Tue, 22 Aug 2023 12:00:12 +0200 [thread overview]
Message-ID: <ZOSHLPD0hiCW32ZS@calendula> (raw)
In-Reply-To: <CAAUX2SUve335kp+RhWi6AxGZz0YXi9ArtJPswvTgNKv_qrQMLQ@mail.gmail.com>
On Tue, Aug 22, 2023 at 05:46:06PM +0800, Tony He wrote:
> Pablo Neira Ayuso <pablo@netfilter.org> 于2023年8月22日周二 16:51写道:
> >
> > On Tue, Aug 22, 2023 at 10:11:00AM +0800, Tony He wrote:
> > [...]
> > > I confirm this issue have been fixed. I even tried about 1000 flow entries.
> > > root@OpenWrt:~# ./conntrack -L -p tcp |wc -l
> > > conntrack v1.4.7 (conntrack-tools): 1024 flow entries have been shown.
> > > 1024
> > > root@OpenWrt:~# ./conntrack -U -p tcp -m 1
> > > tcp 6 7423 ESTABLISHED src=192.168.1.30 dst=10.40.9.83
> > > sport=53786 dport=80 packets=2 bytes=112 src=10.40.9.83
> > > dst=10.40.9.165 sport=80 dport=53786 packets=1 bytes=60 [ASSURED]
> > > mark=1 use=2
> > > tcp 6 103 TIME_WAIT src=192.168.1.30 dst=10.40.9.83 sport=57656
> > > dport=80 packets=6 bytes=398 src=10.40.9.83 dst=10.40.9.165 sport=80
> > > dport=57656 packets=6 bytes=11265 [ASSURED] mark=1 use=2
> > > tcp 6 103 TIME_WAIT src=192.168.1.30 dst=10.40.9.83 sport=57000
> > > dport=80 packets=7 bytes=450 src=10.40.9.83 dst=10.40.9.165 sport=80
> > > dport=57000 packets=7 bytes=11317 [ASSURED] mark=1 use=2
> > > tcp 6 103 TIME_WAIT src=192.168.1.30 dst=10.40.9.83 sport=55730
> > > dport=80 packets=6 bytes=398 src=10.40.9.83 dst=10.40.9.165 sport=80
> > > dport=55730 packets=6 bytes=11265 [ASSURED] mark=1 use=2
> > > ......
> > > conntrack v1.4.7 (conntrack-tools): 1023 flow entries have been updated.
> > >
> > > After above issue is fixed, I can not reproduce "-f ipv4" issue. Seems
> > > that we don't need patch
> > >
> > > https://patchwork.ozlabs.org/project/netfilter-devel/patch/20230821102739.4893-1-pablo@netfilter.org/
> >
> > This is also required because conntrack -U/-D dumps the table from the
> > kernel, then it iterates over the list of entries. If the entry
> > expires, -U/-D will hit ENOENT, which should be ignored. This is
> > another regressions from 1.4.6.
>
> Sorry, I still don't quite understand. I mean if we don't add [1] and
> [2] , I can reproduce "Protocol error".
> However, after adding above [1] and [2], I can not reproduce "Protocol
> error" even though [3] is not added.
> Is [3] used to fix "Protocol error"? If yes, why it can not be
> reproduced by me? My test env is not changed.
>
> [1] https://patchwork.ozlabs.org/project/netfilter-devel/patch/20230821101751.4083-1-pablo@netfilter.org/
> [2] https://patchwork.ozlabs.org/project/netfilter-devel/patch/20230821120105.29538-1-pablo@netfilter.org/
> [3] https://patchwork.ozlabs.org/project/netfilter-devel/patch/20230821102739.4893-1-pablo@netfilter.org/
[1] and [2] are sufficient to fix the problems that you reported.
[3] is a different issue that you did not report that I found while
reviewing this code.
next prev parent reply other threads:[~2023-08-22 10:00 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CAAUX2SVTLxtpzsMnKWCpjRZwAKn391rm5T=y=oHPQ_T1w2UpBA@mail.gmail.com>
2023-08-21 7:44 ` Fwd: question about using conntrack to change the mark Tony He
2023-08-21 10:29 ` Pablo Neira Ayuso
2023-08-21 11:26 ` Tony He
2023-08-21 12:02 ` Pablo Neira Ayuso
2023-08-22 2:11 ` Tony He
2023-08-22 8:51 ` Pablo Neira Ayuso
2023-08-22 9:46 ` Tony He
2023-08-22 10:00 ` Pablo Neira Ayuso [this message]
2023-08-22 10:09 ` Tony He
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=ZOSHLPD0hiCW32ZS@calendula \
--to=pablo@netfilter.org \
--cc=huangya90@gmail.com \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.