]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
netfilter: nf_tables: fix wrong check of NFT_SET_MAP in nf_tables_bind_set
authorLiping Zhang <liping.zhang@spreadtrum.com>
Sat, 11 Jun 2016 04:20:26 +0000 (12:20 +0800)
committerPablo Neira Ayuso <pablo@netfilter.org>
Wed, 15 Jun 2016 10:17:23 +0000 (12:17 +0200)
We should check "i" is used as a dictionary or not, "binding" is already
checked before.

Signed-off-by: Liping Zhang <liping.zhang@spreadtrum.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
net/netfilter/nf_tables_api.c

index 7b7aa871a174fa2a1fd1e002fe0838231035e305..492f6f8efdda308d13b625179ad0a73741345f21 100644 (file)
@@ -2946,7 +2946,7 @@ int nf_tables_bind_set(const struct nft_ctx *ctx, struct nft_set *set,
                 * jumps are already validated for that chain.
                 */
                list_for_each_entry(i, &set->bindings, list) {
-                       if (binding->flags & NFT_SET_MAP &&
+                       if (i->flags & NFT_SET_MAP &&
                            i->chain == binding->chain)
                                goto bind;
                }