netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Pablo Neira Ayuso <pablo@netfilter.org>
To: Florian Westphal <fw@strlen.de>
Cc: netfilter-devel@vger.kernel.org
Subject: Re: [PATCH v2 nf-next 0/9] netfilter: don't copy initns hooks to new namespaces
Date: Mon, 26 Oct 2015 23:55:22 +0100	[thread overview]
Message-ID: <20151026225522.GA15583@salvia> (raw)
In-Reply-To: <1445597006-11264-1-git-send-email-fw@strlen.de>

Hi Florian,

On Fri, Oct 23, 2015 at 12:43:17PM +0200, Florian Westphal wrote:
[...]
> This work aims to change all major hook users to nf_register_net_hook
> so that when a new netns is created it has no hooks at all, even when the
> initial namespace uses conntrack, iptables and bridge netfilter.
>
> To keep behaviour somewhat compatible, xtable hooks are registered once a
> iptables set/getsockopt call is made within a net namespace.
> This also means that e.g. conntrack behaviour is not yet optimal, we
> still create all the data structures and only skip hook registration
> at this time.
> 
> Caveats:
> - conntrack is no longer active just by loading nf_conntrack module -- at
> least one (x)tables rule that requires conntrack has to be added, e.g.
> conntrack match or S/DNAT target.

So far it was possible to run conntrack without iptables, eg. to
collect statistics at per-flow level via ctnetlink. Could you find a
way to enable the hooks also from that path?

If the program polls /proc, too bad for it, it shouldn't be using such
interface for that purpose.

We probably should go back to the idea of having an explicit way of
enabling conntrack from the ruleset, but that will need the /proc
switch to keep there the existing semantics that people expect.

Let me know,
Thanks.

  parent reply	other threads:[~2015-10-26 22:48 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-23 10:43 [PATCH v2 nf-next 0/9] netfilter: don't copy initns hooks to new namespaces Florian Westphal
2015-10-23 10:43 ` [PATCH v2 nf-next 1/9] netfilter: ingress: don't use nf_hook_list_active Florian Westphal
2015-11-06 18:33   ` Pablo Neira Ayuso
2015-10-23 10:43 ` [PATCH v2 nf-next 2/9] netfilter: add and use nf_ct_netns_get/put Florian Westphal
2015-10-23 10:43 ` [PATCH v2 nf-next 3/9] netfilter: conntrack: register hooks in netns when needed by ruleset Florian Westphal
2015-10-23 10:43 ` [PATCH v2 nf-next 4/9] netfilter: xtables: don't register xt hooks in namespace at init time Florian Westphal
2015-10-23 10:43 ` [PATCH v2 nf-next 5/9] netfilter: defrag: only register defrag functionality if needed Florian Westphal
2015-10-23 10:43 ` [PATCH v2 nf-next 6/9] netfilter: nat: add dependencies on conntrack module Florian Westphal
2015-10-23 10:43 ` [PATCH v2 nf-next 7/9] netfilter: bridge: register hooks only when bridge is added Florian Westphal
2015-10-23 10:43 ` [PATCH v2 nf-next 8/9] netfilter: don't call nf_hook_state_init/_hook_slow unless needed Florian Westphal
2015-10-23 10:43 ` [PATCH v2 nf-next 9/9] nftables: add conntrack dependencies for nat/masq/redir expressions Florian Westphal
2015-10-26 22:55 ` Pablo Neira Ayuso [this message]
2015-10-26 23:09   ` [PATCH v2 nf-next 0/9] netfilter: don't copy initns hooks to new namespaces Florian Westphal
2015-10-27 16:35     ` Florian Westphal
2015-10-28 12:39       ` Jan Engelhardt
2015-10-29 20:35       ` Pablo Neira Ayuso
2015-10-29 22:13         ` Florian Westphal
2015-11-02 13:00           ` Florian Westphal
2015-11-24 10:27 ` Pablo Neira Ayuso
2015-11-24 10:59   ` Florian Westphal

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20151026225522.GA15583@salvia \
    --to=pablo@netfilter.org \
    --cc=fw@strlen.de \
    --cc=netfilter-devel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).