Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp13777imu; Mon, 26 Nov 2018 16:22:20 -0800 (PST) X-Google-Smtp-Source: AJdET5fm5HbJy+NLJwmVVSGOxZYG3XeADAHmj6jwy1y3Hxe08+Ax2TXAq7XUE2fi4/Muy2YSpc9V X-Received: by 2002:a62:2292:: with SMTP id p18mr31266748pfj.9.1543278140503; Mon, 26 Nov 2018 16:22:20 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1543278140; cv=none; d=google.com; s=arc-20160816; b=IZgWVxFRKdPmXavZMgeEm5rzgxhF0frcuCPyYPKfEGa/UbiLiWqXpfIhgR+Q2egjez OJ0cVXJxJ/6YqXH1a1TDjBlUFLPeIsD7pz0dyAMiMporxQPNDLhzBL0iPo4JUIYwg4lY 4QgrC9+uQ5MEwokoNTLKpofBQtkwe2Uu60eDx24yoWa0EfO+dovSexX8OyvQJy6eAslM CfftcRmb27uju77XvWdbe+rcCLS7M0E2dpBjUnCXzvupH0N3RfOO564t7FYO14eJSoHR pVhlItQgNoFZfPJwRS8a2byQ07WuXcMV+cecXEAzKrdVZkA/omUFnZiYSEBBUOcTK+51 wK/Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=zpSSoIS3n9A7izAXz9u0uhwxzAo8cY0Sm+lOm+8ZokM=; b=DQCvc2XF3uc22lYvbBCN0/4pQIiB6AZGpHpkKPgXG4ulrTLjwfd6uUKIzqS60gjoYs w6l69F6DpDFoGykopDVvUDPlQDkLY2hAXTF0JV4yDLEd82X+LA1Su16bHxtcUn+JA7+E oxwXtufHZV0MOgE0Jzs5yhRav3J/+rd91ILV9Gd0LpcfRrT3dxyio73n1HMRuBB1BxJh 2UoDOvm8CovTd9kabtbV7g8znX0YeXA9RYVF7CLDkM/CUb1r2vkdAFQ/JruyBp56zELN nHf2Vu8j33K5BaJY6/nGxT1zio2t7QS9+FEIXH9wSQQR9cjRcYJACa3VF91Tm6prrbTw WJrw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l36-v6si1483883plg.436.2018.11.26.16.22.05; Mon, 26 Nov 2018 16:22:20 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727783AbeK0LQr (ORCPT + 99 others); Tue, 27 Nov 2018 06:16:47 -0500 Received: from mail.us.es ([193.147.175.20]:57014 "EHLO mail.us.es" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726888AbeK0LQr (ORCPT ); Tue, 27 Nov 2018 06:16:47 -0500 Received: from antivirus1-rhel7.int (unknown [192.168.2.11]) by mail.us.es (Postfix) with ESMTP id AD865EDB11 for ; Tue, 27 Nov 2018 01:20:49 +0100 (CET) Received: from antivirus1-rhel7.int (localhost [127.0.0.1]) by antivirus1-rhel7.int (Postfix) with ESMTP id 9CE70DA4D0 for ; Tue, 27 Nov 2018 01:20:49 +0100 (CET) Received: by antivirus1-rhel7.int (Postfix, from userid 99) id 928ABDA4C7; Tue, 27 Nov 2018 01:20:49 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on antivirus1-rhel7.int X-Spam-Level: X-Spam-Status: No, score=-108.2 required=7.5 tests=ALL_TRUSTED,BAYES_50, SMTPAUTH_US2,USER_IN_WHITELIST autolearn=disabled version=3.4.1 Received: from antivirus1-rhel7.int (localhost [127.0.0.1]) by antivirus1-rhel7.int (Postfix) with ESMTP id B250BDA4C8; Tue, 27 Nov 2018 01:20:47 +0100 (CET) Received: from 192.168.1.97 (192.168.1.97) by antivirus1-rhel7.int (F-Secure/fsigk_smtp/550/antivirus1-rhel7.int); Tue, 27 Nov 2018 01:20:47 +0100 (CET) X-Virus-Status: clean(F-Secure/fsigk_smtp/550/antivirus1-rhel7.int) Received: from us.es (sys.soleta.eu [212.170.55.40]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: 1984lsi) by entrada.int (Postfix) with ESMTPSA id 78A804265A31; Tue, 27 Nov 2018 01:20:47 +0100 (CET) Date: Tue, 27 Nov 2018 01:20:47 +0100 X-SMTPAUTHUS: auth mail.us.es From: Pablo Neira Ayuso To: Christian Brauner Cc: davem@davemloft.net, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, netfilter-devel@vger.kernel.org, coreteam@netfilter.org, bridge@lists.linux-foundation.org, tyhicks@canonical.com, kadlec@blackhole.kfki.hu, fw@strlen.de, roopa@cumulusnetworks.com, nikolay@cumulusnetworks.com Subject: Re: [PATCH net-next 1/2] br_netfilter: add struct netns_brnf Message-ID: <20181127002047.7jzpfy32oupsthtj@salvia> References: <20181107134859.19896-1-christian@brauner.io> <20181107134859.19896-2-christian@brauner.io> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20181107134859.19896-2-christian@brauner.io> User-Agent: NeoMutt/20170113 (1.7.2) X-Virus-Scanned: ClamAV using ClamSMTP Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, On Wed, Nov 07, 2018 at 02:48:58PM +0100, Christian Brauner wrote: [...] > diff --git a/include/net/netns/netfilter.h b/include/net/netns/netfilter.h > index ca043342c0eb..eedbd1ac940e 100644 > --- a/include/net/netns/netfilter.h > +++ b/include/net/netns/netfilter.h > @@ -35,4 +35,20 @@ struct netns_nf { > bool defrag_ipv6; > #endif > }; > + > +struct netns_brnf { > +#ifdef CONFIG_SYSCTL > + struct ctl_table_header *ctl_hdr; > +#endif > + > + /* default value is 1 */ > + int call_iptables; > + int call_ip6tables; > + int call_arptables; > + > + /* default value is 0 */ > + int filter_vlan_tagged; > + int filter_pppoe_tagged; > + int pass_vlan_indev; > +}; I have spun on this several times, wondering if there's a way to avoid scratching these many bytes per netns to expose these sysctl entries that are plain on/off toggles... You said this: >Currently, the /proc/sys/net/bridge folder is only created in the >initial network namespace I think we can add one single sysctl to expose these as flags from net namespaces. Idea is to keep the existing (legacy) sysctl entries for init_net only, and add a new single new one that exposes these as flags (should be also available for consistency in init_net I'd suggest). Flags could be map in this way, eg. 0x1 call_iptables 0x2 call_ip6tables 0x4 call_arptables 0x8 filter_vlan_tagged ... Also documentation would be good to have for this. Would this idea fly for you? Thanks.