From: Arturo Borrero Date: Sun, 26 Oct 2014 11:22:40 +0000 (+0100) Subject: netfilter: nft_compat: fix wrong target lookup in nft_target_select_ops() X-Git-Tag: v3.14.25~39 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=8d445bdcdb7bd750f1a8f490f0d220c736633498;p=platform%2Fkernel%2Flinux-stable.git netfilter: nft_compat: fix wrong target lookup in nft_target_select_ops() commit 7965ee93719921ea5978f331da653dfa2d7b99f5 upstream. The code looks for an already loaded target, and the correct list to search is nft_target_list, not nft_match_list. Signed-off-by: Arturo Borrero Gonzalez Signed-off-by: Pablo Neira Ayuso Signed-off-by: Greg Kroah-Hartman --- diff --git a/net/netfilter/nft_compat.c b/net/netfilter/nft_compat.c index 82cb823..ad97961 100644 --- a/net/netfilter/nft_compat.c +++ b/net/netfilter/nft_compat.c @@ -678,7 +678,7 @@ nft_target_select_ops(const struct nft_ctx *ctx, family = ctx->afi->family; /* Re-use the existing target if it's already loaded. */ - list_for_each_entry(nft_target, &nft_match_list, head) { + list_for_each_entry(nft_target, &nft_target_list, head) { struct xt_target *target = nft_target->ops.data; if (strcmp(target->name, tg_name) == 0 &&