mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-05 08:26:59 +00:00
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>
This commit is contained in:
parent
50656d9df6
commit
2daf1b4d18
1 changed files with 2 additions and 2 deletions
|
@ -117,7 +117,7 @@ nft_target_set_tgchk_param(struct xt_tgchk_param *par,
|
||||||
struct xt_target *target, void *info,
|
struct xt_target *target, void *info,
|
||||||
union nft_entry *entry, u8 proto, bool inv)
|
union nft_entry *entry, u8 proto, bool inv)
|
||||||
{
|
{
|
||||||
par->net = &init_net;
|
par->net = ctx->net;
|
||||||
par->table = ctx->table->name;
|
par->table = ctx->table->name;
|
||||||
switch (ctx->afi->family) {
|
switch (ctx->afi->family) {
|
||||||
case AF_INET:
|
case AF_INET:
|
||||||
|
@ -324,7 +324,7 @@ nft_match_set_mtchk_param(struct xt_mtchk_param *par, const struct nft_ctx *ctx,
|
||||||
struct xt_match *match, void *info,
|
struct xt_match *match, void *info,
|
||||||
union nft_entry *entry, u8 proto, bool inv)
|
union nft_entry *entry, u8 proto, bool inv)
|
||||||
{
|
{
|
||||||
par->net = &init_net;
|
par->net = ctx->net;
|
||||||
par->table = ctx->table->name;
|
par->table = ctx->table->name;
|
||||||
switch (ctx->afi->family) {
|
switch (ctx->afi->family) {
|
||||||
case AF_INET:
|
case AF_INET:
|
||||||
|
|
Loading…
Reference in a new issue