From mboxrd@z Thu Jan 1 00:00:00 1970 From: Pablo Neira Ayuso Subject: Re: [PATCH net-next 00/15] Simplify netfilter and network namespaces Date: Mon, 15 Jun 2015 09:06:22 +0200 Message-ID: <20150615070622.GA3315@salvia> References: <87616ppt3h.fsf@x220.int.ebiederm.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: David Miller , netdev@vger.kernel.org, netfilter-devel@vger.kernel.org, Stephen Hemminger , Juanjo Ciarlante , Wensong Zhang , Simon Horman , Julian Anastasov , Patrick McHardy , Jozsef Kadlecsik , Jamal Hadi Salim , Steffen Klassert , Herbert Xu To: "Eric W. Biederman" Return-path: Received: from mail.us.es ([193.147.175.20]:56375 "EHLO mail.us.es" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752517AbbFOHBE (ORCPT ); Mon, 15 Jun 2015 03:01:04 -0400 Content-Disposition: inline In-Reply-To: <87616ppt3h.fsf@x220.int.ebiederm.org> Sender: netfilter-devel-owner@vger.kernel.org List-ID: Hi Eric, On Sun, Jun 14, 2015 at 10:07:30PM -0500, Eric W. Biederman wrote: > > While looking into what it would take to route packets out to network > devices in other network namespaces I started looking at the netfilter > hooks, and there is a lot of nasty code to figure out which network > namespace to filter the packets in. > > Just passing the network namespace into the netfilter hooks looks like a > significant simplication in the code, and worth it as the first thing > most netfilter hooks do is compute the network namespace. > > We probably even want per network namespace netfilter hooks as nftables > tries (and fails to use). nftables currently has a fairly serious bug > where the tables for one network namespace run for packets in all > network namespaces. I do not have a fix yet but I think this patchset > making it easy to get at the network namespace is a good starting > place for a fix. I have a patchset that is almost ready to convert netfilter to pernet hooks, it partially clashes with this. Will send it out today and will Cc you so you can review it. I think it should take me little time to rebase it on top of yours. It's rather large changeset, which quite a lot of boiler plate code though.