Skip to content

Commit

Permalink
netfilter: nft_compat: use the match->table to validate dependencies
Browse files Browse the repository at this point in the history
Instead of the match->name, which is of course not relevant.

Fixes: f3f5dde ("netfilter: nft_compat: validate chain type in match/target")
Signed-off-by: Pablo Neira Ayuso <[email protected]>
  • Loading branch information
ummakynes committed Nov 12, 2014
1 parent c918687 commit afefb6f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions net/netfilter/nft_compat.c
Original file line number Diff line number Diff line change
Expand Up @@ -346,7 +346,7 @@ nft_match_init(const struct nft_ctx *ctx, const struct nft_expr *expr,
union nft_entry e = {};
int ret;

ret = nft_compat_chain_validate_dependency(match->name, ctx->chain);
ret = nft_compat_chain_validate_dependency(match->table, ctx->chain);
if (ret < 0)
goto err;

Expand Down Expand Up @@ -420,7 +420,7 @@ static int nft_match_validate(const struct nft_ctx *ctx,
if (!(hook_mask & match->hooks))
return -EINVAL;

ret = nft_compat_chain_validate_dependency(match->name,
ret = nft_compat_chain_validate_dependency(match->table,
ctx->chain);
if (ret < 0)
return ret;
Expand Down

0 comments on commit afefb6f

Please sign in to comment.