Received: by 2002:a05:6a10:6744:0:0:0:0 with SMTP id w4csp2499047pxu; Fri, 9 Oct 2020 20:38:22 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzkvvHVUG+EyVnT9uW03sIQwK1QrxN7a59lb8XYqy4v2qLo0vPm/8F7uWdEcVNtkmd0wL0P X-Received: by 2002:a17:906:cc53:: with SMTP id mm19mr17367260ejb.514.1602301101863; Fri, 09 Oct 2020 20:38:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1602301101; cv=none; d=google.com; s=arc-20160816; b=wfDtE+4pMepeYE+vHp8Dui4DmXE0CAaVf0DgNsFXx+LyT4wEtkPi4bnCQu1rXZCwk0 DekbA+BIyOqhMrVbOy6tVw1+ezn8Ktgj2TxrI0+xTLavbGrkBpE1xikWL9H04nMIXnc7 I/7F8NrISJPN7GhfW16qbt5pTA2HCI0fde/tbiIUhNuVMVudQqm4fxWi9FJEMNi7qFHf aqY2Y91SKUaCb2xCuvJ3R+7PuGB/k0hM2VCIGU2umcx0ClD9OJKw9jqPy87mGT9fybp8 BsmlZXj9zsQJ96UUf8xOt5ccgoGQ9z/RInxK0Y5gVIhcH7/uTKZXXks8ldj/Ce6CWESD Cedw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=a/33o38YEXpnYn78Hra6OqwtfigvQU44C8xZJRjQD/c=; b=lk/kVZAFVnk4WQpwmYQSVpG7E9LoBiHN9IFqwKl21UHQrbfYq7dD7vAY0ZhGCG907y NqpWj78xAZAyTJN0paUg+YLKhGSac/hdMF0iJEQRSvCkzE0+ozjP0hSFXKJLmeK/+eTN quMv2ai8jRo/TD1MQCFDdOyBBr0fl5yKGKyp6UL5MhTMhhrCsOa2x1yXFdZVrDajauSC 2MBMspivfJx/szxjPAx0HgTG5SMInnZjaq+DMrnUtCkK6zwiAB2M/YnCfdM9ar7HoY9I jlSouIdrY6bIDu0EZl+Iiu52jpMvJr5Ox8pPoq+l2id8AN1WFOv5n8gMlSFTE0kSB7RB zOlA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id i2si1548226edr.81.2020.10.09.20.37.52; Fri, 09 Oct 2020 20:38:21 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2391395AbgJIUIo (ORCPT + 99 others); Fri, 9 Oct 2020 16:08:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49364 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388178AbgJIUF7 (ORCPT ); Fri, 9 Oct 2020 16:05:59 -0400 Received: from Chamillionaire.breakpoint.cc (Chamillionaire.breakpoint.cc [IPv6:2a0a:51c0:0:12e:520::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 29AFCC0613D5; Fri, 9 Oct 2020 13:05:59 -0700 (PDT) Received: from fw by Chamillionaire.breakpoint.cc with local (Exim 4.92) (envelope-from ) id 1kQyeC-0001He-AQ; Fri, 09 Oct 2020 22:05:48 +0200 Date: Fri, 9 Oct 2020 22:05:48 +0200 From: Florian Westphal To: Jozsef Kadlecsik Cc: Florian Westphal , Francesco Ruggeri , open list , netdev , coreteam@netfilter.org, netfilter-devel@vger.kernel.org, Jakub Kicinski , David Miller , Pablo Neira Ayuso Subject: Re: [PATCH nf v2] netfilter: conntrack: connection timeout after re-register Message-ID: <20201009200548.GG5723@breakpoint.cc> References: <20201007193252.7009D95C169C@us180.sjc.aristanetworks.com> <20201009110323.GC5723@breakpoint.cc> <20201009185552.GF5723@breakpoint.cc> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Jozsef Kadlecsik 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.