From: Pablo Neira Ayuso <pablo@netfilter.org>
To: Sven Auhagen <sven.auhagen@voleatech.de>
Cc: netfilter-devel@vger.kernel.org, cratiu@nvidia.com,
ozsh@nvidia.com, vladbu@nvidia.com, gal@nvidia.com, fw@strlen.de
Subject: Re: [PATCH nf] netfilter: flowtable: infer TCP state and timeout before flow teardown
Date: Wed, 20 Mar 2024 11:36:05 +0100 [thread overview]
Message-ID: <Zfq8FedQ05ZuY9o6@calendula> (raw)
In-Reply-To: <fcas4qeo45hbbjmu6h2ipryoi4cmhmhtzhudabqdj6egzxidg6@o5kaoqak26io>
On Wed, Mar 20, 2024 at 11:13:23AM +0100, Sven Auhagen wrote:
> On Wed, Mar 20, 2024 at 10:51:39AM +0100, Pablo Neira Ayuso wrote:
> > On Wed, Mar 20, 2024 at 10:31:00AM +0100, Sven Auhagen wrote:
> > > On Wed, Mar 20, 2024 at 10:27:30AM +0100, Pablo Neira Ayuso wrote:
> > > > On Wed, Mar 20, 2024 at 10:20:29AM +0100, Sven Auhagen wrote:
[...]
> > > I think for it to be foolproof we need
> > > to migrate the TCP state as well in flow_offload_teardown_tcp to FIN or CLOSE.
> >
> > My patch already does it:
> >
> > +void flow_offload_teardown_tcp(struct flow_offload *flow, bool fin)
> > +{
> > + enum tcp_conntrack tcp_state;
> > +
> > + if (fin)
> > + tcp_state = TCP_CONNTRACK_FIN_WAIT;
> > + else /* rst */
> > + tcp_state = TCP_CONNTRACK_CLOSE;
> > +
> > + flow_offload_fixup_tcp(nf_ct_net(flow->ct), flow->ct, tcp_state);
> >
> > flow_offload_fixup_tcp() updates the TCP state to FIN / CLOSE state.
>
> Ah you are correct.
> Never the less I can tell you that I still see this problem with the patch attached:
>
> [UPDATE] tcp 6 120 FIN_WAIT src=192.168.7.105 dst=17.253.57.219 sport=49574 dport=443 src=17.253.57.219 dst=87.138.198.79 sport=443 dport=5078 [OFFLOAD] mark=25165825
> [UPDATE] tcp 6 30 LAST_ACK src=192.168.7.105 dst=17.253.57.219 sport=49574 dport=443 src=17.253.57.219 dst=87.138.198.79 sport=443 dport=5078 [ASSURED] mark=25165825
> [UPDATE] tcp 6 10 CLOSE src=192.168.7.105 dst=17.253.57.219 sport=49574 dport=443 src=17.253.57.219 dst=87.138.198.79 sport=443 dport=5078 [ASSURED] mark=25165825
> [DESTROY] tcp 6 CLOSE src=192.168.7.105 dst=17.253.57.219 sport=49574 dport=443 packets=15 bytes=2688 src=17.253.57.219 dst=87.138.198.79 sport=443 dport=5078 packets=18 bytes=7172 [ASSURED] mark=25165825 delta-time=126
Just to make sure, are you testing with these two patches?
https://patchwork.ozlabs.org/project/netfilter-devel/patch/20240320092638.798076-1-pablo@netfilter.org/
https://patchwork.ozlabs.org/project/netfilter-devel/patch/20240320092638.798076-2-pablo@netfilter.org/
next prev parent reply other threads:[~2024-03-20 10:36 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-18 9:39 [PATCH nf] netfilter: flowtable: infer TCP state and timeout before flow teardown Pablo Neira Ayuso
2024-03-18 10:05 ` Sven Auhagen
2024-03-20 8:39 ` Sven Auhagen
2024-03-20 8:45 ` Pablo Neira Ayuso
2024-03-20 8:49 ` Sven Auhagen
2024-03-20 9:07 ` Pablo Neira Ayuso
2024-03-20 9:20 ` Sven Auhagen
2024-03-20 9:27 ` Pablo Neira Ayuso
2024-03-20 9:31 ` Sven Auhagen
2024-03-20 9:51 ` Pablo Neira Ayuso
2024-03-20 10:13 ` Sven Auhagen
2024-03-20 10:36 ` Pablo Neira Ayuso [this message]
2024-03-20 10:38 ` Sven Auhagen
2024-03-20 10:29 ` Sven Auhagen
2024-03-20 10:47 ` Pablo Neira Ayuso
2024-03-20 11:15 ` Sven Auhagen
2024-03-20 12:37 ` Pablo Neira Ayuso
2024-03-20 13:37 ` Sven Auhagen
2024-04-08 5:24 ` Sven Auhagen
2024-04-09 11:11 ` Pablo Neira Ayuso
2024-04-09 11:35 ` Sven Auhagen
2024-04-11 9:27 ` Pablo Neira Ayuso
2024-04-11 11:05 ` Florian Westphal
2024-04-11 11:40 ` Pablo Neira Ayuso
2024-04-11 12:13 ` Florian Westphal
2024-04-11 15:50 ` Pablo Neira Ayuso
2024-04-19 7:47 ` Sven Auhagen
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=Zfq8FedQ05ZuY9o6@calendula \
--to=pablo@netfilter.org \
--cc=cratiu@nvidia.com \
--cc=fw@strlen.de \
--cc=gal@nvidia.com \
--cc=netfilter-devel@vger.kernel.org \
--cc=ozsh@nvidia.com \
--cc=sven.auhagen@voleatech.de \
--cc=vladbu@nvidia.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 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.