[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20201009200548.GG5723@breakpoint.cc>
Date: Fri, 9 Oct 2020 22:05:48 +0200
From: Florian Westphal <fw@...len.de>
To: Jozsef Kadlecsik <kadlec@...filter.org>
Cc: Florian Westphal <fw@...len.de>,
Francesco Ruggeri <fruggeri@...sta.com>,
open list <linux-kernel@...r.kernel.org>,
netdev <netdev@...r.kernel.org>, coreteam@...filter.org,
netfilter-devel@...r.kernel.org, Jakub Kicinski <kuba@...nel.org>,
David Miller <davem@...emloft.net>,
Pablo Neira Ayuso <pablo@...filter.org>
Subject: Re: [PATCH nf v2] netfilter: conntrack: connection timeout after
re-register
Jozsef Kadlecsik <kadlec@...filter.org> wrote:
> > The "delay unregister" remark was wrt. the "all rules were deleted"
> > case, i.e. add a "grace period" rather than acting right away when
> > conntrack use count did hit 0.
>
> Now I understand it, thanks really. The hooks are removed, so conntrack
> cannot "see" the packets and the entries become stale.
Yes.
> What is the rationale behind "remove the conntrack hooks when there are no
> rule left referring to conntrack"? Performance optimization? But then the
> content of the whole conntrack table could be deleted too... ;-)
Yes, this isn't the case at the moment -- only hooks are removed,
entries will eventually time out.
> > Conntrack entries are not removed, only the base hooks get unregistered.
> > This is a problem for tcp window tracking.
> >
> > When re-register occurs, kernel is supposed to switch the existing
> > entries to "loose" mode so window tracking won't flag packets as
> > invalid, but apparently this isn't enough to handle keepalive case.
>
> "loose" (nf_ct_tcp_loose) mode doesn't disable window tracking, it
> enables/disables picking up already established connections.
>
> nf_ct_tcp_be_liberal would disable TCP window checking (but not tracking)
> for non RST packets.
You are right, mixup on my part.
> But both seems to be modified only via the proc entries.
Yes, we iterate table on re-register and modify the existing entries.
Powered by blists - more mailing lists