diff options
author | Pablo Neira Ayuso <pablo@netfilter.org> | 2014-11-07 12:48:33 -0500 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2014-11-12 06:06:24 -0500 |
commit | 2daf1b4d18e3add229d1a3b5c554331d99ac6c7e (patch) | |
tree | d46f08b7fabcf045983bee6c5750f2bc2e447c30 /net/netfilter | |
parent | 50656d9df63d69ce399c8be62d4473b039dac36a (diff) |
netfilter: nft_compat: use current net namespace
Instead of init_net when using xtables over nftables compat.
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'net/netfilter')
-rw-r--r-- | net/netfilter/nft_compat.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/net/netfilter/nft_compat.c b/net/netfilter/nft_compat.c index 9d6d6f60a80f..b92f129beade 100644 --- a/net/netfilter/nft_compat.c +++ b/net/netfilter/nft_compat.c | |||
@@ -117,7 +117,7 @@ nft_target_set_tgchk_param(struct xt_tgchk_param *par, | |||
117 | struct xt_target *target, void *info, | 117 | struct xt_target *target, void *info, |
118 | union nft_entry *entry, u8 proto, bool inv) | 118 | union nft_entry *entry, u8 proto, bool inv) |
119 | { | 119 | { |
120 | par->net = &init_net; | 120 | par->net = ctx->net; |
121 | par->table = ctx->table->name; | 121 | par->table = ctx->table->name; |
122 | switch (ctx->afi->family) { | 122 | switch (ctx->afi->family) { |
123 | case AF_INET: | 123 | case AF_INET: |
@@ -324,7 +324,7 @@ nft_match_set_mtchk_param(struct xt_mtchk_param *par, const struct nft_ctx *ctx, | |||
324 | struct xt_match *match, void *info, | 324 | struct xt_match *match, void *info, |
325 | union nft_entry *entry, u8 proto, bool inv) | 325 | union nft_entry *entry, u8 proto, bool inv) |
326 | { | 326 | { |
327 | par->net = &init_net; | 327 | par->net = ctx->net; |
328 | par->table = ctx->table->name; | 328 | par->table = ctx->table->name; |
329 | switch (ctx->afi->family) { | 329 | switch (ctx->afi->family) { |
330 | case AF_INET: | 330 | case AF_INET: |