diff options
author | Pablo Neira Ayuso <pablo@netfilter.org> | 2014-11-10 13:08:21 -0500 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2014-11-12 06:06:24 -0500 |
commit | afefb6f928ed42d5db452ee9251ce6de62673c67 (patch) | |
tree | c66b5b601862fa200b1613629e332a5d89d83ab7 /net | |
parent | c918687f5e3962375a19de6ded3c1be85ebdbcd6 (diff) |
netfilter: nft_compat: use the match->table to validate dependencies
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 <pablo@netfilter.org>
Diffstat (limited to 'net')
-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 70dc96516305..265e190f2218 100644 --- a/net/netfilter/nft_compat.c +++ b/net/netfilter/nft_compat.c | |||
@@ -346,7 +346,7 @@ nft_match_init(const struct nft_ctx *ctx, const struct nft_expr *expr, | |||
346 | union nft_entry e = {}; | 346 | union nft_entry e = {}; |
347 | int ret; | 347 | int ret; |
348 | 348 | ||
349 | ret = nft_compat_chain_validate_dependency(match->name, ctx->chain); | 349 | ret = nft_compat_chain_validate_dependency(match->table, ctx->chain); |
350 | if (ret < 0) | 350 | if (ret < 0) |
351 | goto err; | 351 | goto err; |
352 | 352 | ||
@@ -420,7 +420,7 @@ static int nft_match_validate(const struct nft_ctx *ctx, | |||
420 | if (!(hook_mask & match->hooks)) | 420 | if (!(hook_mask & match->hooks)) |
421 | return -EINVAL; | 421 | return -EINVAL; |
422 | 422 | ||
423 | ret = nft_compat_chain_validate_dependency(match->name, | 423 | ret = nft_compat_chain_validate_dependency(match->table, |
424 | ctx->chain); | 424 | ctx->chain); |
425 | if (ret < 0) | 425 | if (ret < 0) |
426 | return ret; | 426 | return ret; |