Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp4761842pxv; Tue, 27 Jul 2021 16:06:44 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz5t2lob6cVUvuwxsqSrlz69stwqj5h8X+heOhk1Yp2AavtRuYY7/TdIrlJ4qZlgqT/vJ5A X-Received: by 2002:a17:906:6d85:: with SMTP id h5mr233339ejt.305.1627427204505; Tue, 27 Jul 2021 16:06:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1627427204; cv=none; d=google.com; s=arc-20160816; b=wsKhzf1W2kEOVh6m26vFpuKAdo3tvjZSFr7PQGIltXkJ7F96f5hqvGWkv5N62k76B8 Iglo+k2/j4SXvWcZJFdI/QRdHYapiirh0CervEbDsaz4dLO0amRQyY+WrD5LJiGaO/xz pOLoIAbtd30xrr8JYh/xGm4M2KIG7wWHfV5W1TPlZx8xEOEbm+UTC0u/Td1QQ57PSSbO 5ryHMHxi4PzBGaPOUNZ550+PHfikyoXn633Byxe7hFehlT/f55Q3qj+F9WDj1q/o9xg4 A8M7ntCfwRnnGPTq4DxcAT2N8EaQ//dKFiiOtN/gb8MRr+1NsC39EOupobCpgA3FwR0f THag== 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=Q8XwXXW+0OLt95YRchy42gPDCDsmLkXITfpLNjso/3Q=; b=zLER774EJjA5tRtRImrAyan08/brdOJA20pT4CmRdUqbV8tkQvEFjbiRu+ANvxozhM Mtk31d+5TkOVXz4o5+VyIX3fll0WCkjQGwQF1SJP+SKU6HpJQIQV3cZk3T1AHy4Dn5uY jIkC8aid0UFelEPCtANhwuC86wN/Ojfm4UPSlOZTAOxQ7E/c0OTD9j+52BSh5YMtKdz4 uen5xoywTdhd5YIaLwnNk0Yz5tfhE6OcmvLfgsb1nl4epC3nUxPrzGxMLdVXP993jG1E TFZ+Sw7r4jzpDPX3N6UfpzkocE/+hx9n7IHP7U1hyiqCPQo+KT2Zey8dKYraV2PkbfQ9 Tyzg== 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 g18si4055895edp.610.2021.07.27.16.06.21; Tue, 27 Jul 2021 16:06:44 -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 S232903AbhG0XCg (ORCPT + 99 others); Tue, 27 Jul 2021 19:02:36 -0400 Received: from mail.netfilter.org ([217.70.188.207]:37010 "EHLO mail.netfilter.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232198AbhG0XCg (ORCPT ); Tue, 27 Jul 2021 19:02:36 -0400 Received: from netfilter.org (bl11-146-165.dsl.telepac.pt [85.244.146.165]) by mail.netfilter.org (Postfix) with ESMTPSA id 112606429D; Wed, 28 Jul 2021 01:02:03 +0200 (CEST) Date: Wed, 28 Jul 2021 01:02:30 +0200 From: Pablo Neira Ayuso To: Alex Forster Cc: Kyle Bowman , kernel-team , Jozsef Kadlecsik , Florian Westphal , "David S. Miller" , Jakub Kicinski , netfilter-devel@vger.kernel.org, coreteam@netfilter.org, linux-kernel@vger.kernel.org, Network Development Subject: Re: [PATCH] netfilter: xt_NFLOG: allow 128 character log prefixes Message-ID: <20210727230230.GA30104@salvia> References: <20210727190001.914-1-kbowman@cloudflare.com> <20210727195459.GA15181@salvia> <20210727211029.GA17432@salvia> <20210727212730.GA20772@salvia> <20210727215240.GA25043@salvia> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 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 On Tue, Jul 27, 2021 at 05:45:09PM -0500, Alex Forster wrote: > > Yes, you can update iptables-nft to use nft_log instead of xt_LOG, > > that requires no kernel upgrades and it will work with older kernels. > > I've always been under the impression that mixing xtables and nftables > was impossible. Forgive me, but I just want to clarify one more time: > you're saying we should be able to modify iptables-nft such that the > following rule will use xt_bpf to match a packet and then nft_log to > log it, rather than xt_log as it does today? You could actually use *any* of the existing extensions to match a packet, the matching side is completely irrelevant to this picture. As I said, userspace iptables-nft can be updated to use nft_log instead of xt_LOG. > iptables-nft -A test-chain -d 11.22.33.44/32 -m bpf --bytecode > "1,6 0 0 65536" -j NFLOG --nflog-prefix > "0123456789012345678901234567890123456789012345678901234567890123456789" > > We had some unexplained performance loss when we were evaluating > switching to iptables-nft, but if this sort of mixing is possible then > it is certainly worth reevaluating.