diff options
author | Patrick McHardy <kaber@trash.net> | 2015-03-21 15:19:15 +0000 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2015-03-25 12:09:38 +0100 |
commit | 5ebb335dcbe63470c88c4f80f2d571089543b638 (patch) | |
tree | 92475f2f78434af4101ffe54c52dce51f76fb1a4 /net/netfilter/nf_tables_api.c | |
parent | 0144a81cccf7532bead90f0542f517bd028d3b3c (diff) | |
download | op-kernel-dev-5ebb335dcbe63470c88c4f80f2d571089543b638.zip op-kernel-dev-5ebb335dcbe63470c88c4f80f2d571089543b638.tar.gz |
netfilter: nf_tables: move struct net pointer to base chain
The network namespace is only needed for base chains to get at the
gencursor. Also convert to possible_net_t.
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'net/netfilter/nf_tables_api.c')
-rw-r--r-- | net/netfilter/nf_tables_api.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/netfilter/nf_tables_api.c b/net/netfilter/nf_tables_api.c index 363a39a..0b969b6 100644 --- a/net/netfilter/nf_tables_api.c +++ b/net/netfilter/nf_tables_api.c @@ -1354,6 +1354,7 @@ static int nf_tables_newchain(struct sock *nlsk, struct sk_buff *skb, rcu_assign_pointer(basechain->stats, stats); } + write_pnet(&basechain->pnet, net); basechain->type = type; chain = &basechain->chain; @@ -1381,7 +1382,6 @@ static int nf_tables_newchain(struct sock *nlsk, struct sk_buff *skb, INIT_LIST_HEAD(&chain->rules); chain->handle = nf_tables_alloc_handle(table); - chain->net = net; chain->table = table; nla_strlcpy(chain->name, name, NFT_CHAIN_MAXNAMELEN); |