Received: by 2002:a05:7412:251c:b0:e2:908c:2ebd with SMTP id w28csp2127313rda; Tue, 24 Oct 2023 13:12:18 -0700 (PDT) X-Google-Smtp-Source: AGHT+IG+nYwZOkiCvwXIsTB809wzxeVyQ3zSDLLymezKXC5xiKJkCFeWd5pnT4fZqK6WV86zT08m X-Received: by 2002:a05:6a21:6d96:b0:154:3f13:1bb7 with SMTP id wl22-20020a056a216d9600b001543f131bb7mr4765693pzb.49.1698178337793; Tue, 24 Oct 2023 13:12:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698178337; cv=none; d=google.com; s=arc-20160816; b=nCrj6Bhypw0Zw+zhQcmqfr3DYeHW+CWTW/hxkv2hYkIj7btRy+MTw78Np2SSonV1Um iDuJoVKhzrBtakbneIilTR9PjimKp8DkSzA+SRUa2cjVIlryDF19Gv2UyB/smlLeAfHf n/6gyCvqRIFUgrhhSmxVkOvo7onWF8druJtnV7aeQz+J8WZOxGdJFmS9Bp8zz67TwSVn Yx1MLMnvt7LJOxVLm6JJ0r+SXrSd+uIHxPT6osRfmzGD21aWzxuqcslIBsF7GCcdmRu0 SgFuelTzGvGjElIKX4ZDJVdbD8bYvOIGM5ispVnVDqNN9SH1nv3EYKP5J1aGSl03JFIv mT6g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=yKuiuXn8adHnDeif0DbHDGJrUvQWnegzsykRjKRr5tk=; fh=+rJCO2LIyESeX28OGCRyglj0/o72o1qsIYc0xp+i5s8=; b=Nrn8A/t1TfLavkNBBTycY8YQerzFFPSLunTyxOxOoqwPnJZ3Ev2KKkSXDoEGh+nPT7 f4w7/IgLm7bvMoGyZN71MzMUJznDeZWWRLRTUxIFo7zP4EYWGwGaIL3rnsb4QTA60I8E EOM98Q24/X6fvWNKdLDILRmIUDSQZRDfqd3ZzIfLVY6/ElHMU+ORgGd5fNibNAhL6AQh iLBKawePi1rzj1zavRRgVkvACrh9/7V/6or3+i9UkML//xnnjuiblqH+b1juOoyJIIVT bcgeEhdJkGm4/1GrKU4p8hzYqvsNKp+nZ555Ja8HtUwA1CMnhHsgFUl0QRqRdyxyFEvA 5hZw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from lipwig.vger.email (lipwig.vger.email. [2620:137:e000::3:3]) by mx.google.com with ESMTPS id k18-20020aa79732000000b00690b88a9c32si8644251pfg.82.2023.10.24.13.12.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 24 Oct 2023 13:12:17 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) client-ip=2620:137:e000::3:3; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id 681848025B4B; Tue, 24 Oct 2023 13:12:15 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344301AbjJXULy (ORCPT + 99 others); Tue, 24 Oct 2023 16:11:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49124 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1343896AbjJXULx (ORCPT ); Tue, 24 Oct 2023 16:11:53 -0400 Received: from ganesha.gnumonks.org (ganesha.gnumonks.org [IPv6:2001:780:45:1d:225:90ff:fe52:c662]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D149FD7A; Tue, 24 Oct 2023 13:11:49 -0700 (PDT) Received: from [78.30.35.151] (port=58754 helo=gnumonks.org) by ganesha.gnumonks.org with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qvNkf-008pvw-J8; Tue, 24 Oct 2023 22:11:47 +0200 Date: Tue, 24 Oct 2023 22:11:44 +0200 From: Pablo Neira Ayuso To: Bagas Sanjaya Cc: Vladimir Smelhaus , Linux Netfilter , coreteam@netfilter.org, Linux Kernel Mailing List , Linux Regressions , Jozsef Kadlecsik , Florian Westphal Subject: Re: Flowtables ignore timeout settings in recent kernels Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: X-Spam-Score: -1.9 (-) X-Spam-Status: No, score=-0.8 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lipwig.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (lipwig.vger.email [0.0.0.0]); Tue, 24 Oct 2023 13:12:15 -0700 (PDT) On Mon, Oct 16, 2023 at 07:20:06AM +0700, Bagas Sanjaya wrote: > On Sun, Oct 15, 2023 at 09:56:14PM +0200, Vladimir Smelhaus wrote: > > Netfilter ignores the timeout settings for a flowtable > > > > # sysctl -a -r flowtable > > net.netfilter.nf_flowtable_tcp_timeout = 30 > > net.netfilter.nf_flowtable_udp_timeout = 30 > > > > Situation. A long udp connection (tunnel) with some data flowing through a > > router. The connection is sent to a flowtable on the router. It's a few > > packets per second, more here and there, a pause here and there, and so on > > over and over. The pauses are minimal and are also limited by the tunnel > > settings to be no longer than 25 seconds. Everything is satisfying to make > > the connection last continuously in the flowtable and not reappear in > > forward. However, the connection keeps dropping out of the flowtable. It > > stays in the flowtable (offloaded) for a second at most and then it is > > kicked out, back to forward. > > > > In an attached test script you can see counters that should be zero but are not. If I watch the normal packet flow on a particular router, I can see packets in the conntrack table that should be OFFLOAD as ASSURED. > > > > Tested in kernel 6.5.6. In an old(er) kernel 5.10 it works as expected. > > > > Then please perform bisection to find a culprit that introduces your > regression (see Documentation/admin-guide/bug-bisect.rst in the kernel > sources for reference). Also, it'd been great if you also post the > reproducer script inline (within your email) instead, as some MUAs > (like mutt that I'm using now) may ignore the attachment. > > Anyway, thanks for the regression report. I'm adding it to regzbot: > > #regzbot ^introduced: v5.10..v6.5 Fix here: https://patchwork.ozlabs.org/project/netfilter-devel/patch/20231024193815.1987-1-pablo@netfilter.org/ it is a bug from Jun 2023, regression was introduced in the v6.5 development cycle. Thanks for reporting.