diff options
author | Eric W. Biederman | 2015-07-11 01:15:44 +0200 |
---|---|---|
committer | Pablo Neira Ayuso | 2015-07-15 18:17:36 +0200 |
commit | fd2ecda0341960d0ce361d648cf4dd98187afb06 (patch) | |
tree | 31c7d09add0eab85326a0200331a68c5f4815edd /net/netfilter/nf_tables_core.c | |
parent | netfilter: Per network namespace netfilter hooks. (diff) | |
download | kernel-qcow2-linux-fd2ecda0341960d0ce361d648cf4dd98187afb06.tar.gz kernel-qcow2-linux-fd2ecda0341960d0ce361d648cf4dd98187afb06.tar.xz kernel-qcow2-linux-fd2ecda0341960d0ce361d648cf4dd98187afb06.zip |
netfilter: nftables: Only run the nftables chains in the proper netns
- Register the nftables chains in the network namespace that they need
to run in.
- Remove the hacks that stopped chains running in the wrong network
namespace.
Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'net/netfilter/nf_tables_core.c')
-rw-r--r-- | net/netfilter/nf_tables_core.c | 5 |
1 files changed, 0 insertions, 5 deletions
diff --git a/net/netfilter/nf_tables_core.c b/net/netfilter/nf_tables_core.c index f77bad46ac68..05d0b03530f6 100644 --- a/net/netfilter/nf_tables_core.c +++ b/net/netfilter/nf_tables_core.c @@ -114,7 +114,6 @@ unsigned int nft_do_chain(struct nft_pktinfo *pkt, const struct nf_hook_ops *ops) { const struct nft_chain *chain = ops->priv, *basechain = chain; - const struct net *chain_net = read_pnet(&nft_base_chain(basechain)->pnet); const struct net *net = dev_net(pkt->in ? pkt->in : pkt->out); const struct nft_rule *rule; const struct nft_expr *expr, *last; @@ -125,10 +124,6 @@ nft_do_chain(struct nft_pktinfo *pkt, const struct nf_hook_ops *ops) int rulenum; unsigned int gencursor = nft_genmask_cur(net); - /* Ignore chains that are not for the current network namespace */ - if (!net_eq(net, chain_net)) - return NF_ACCEPT; - do_chain: rulenum = 0; rule = list_entry(&chain->rules, struct nft_rule, list); |