Skip to content

Commit

Permalink
netfilter: nft_compat: fix wrong target lookup in nft_target_select_o…
Browse files Browse the repository at this point in the history
…ps()

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 <arturo.borrero.glez@gmail.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
  • Loading branch information
Arturo Borrero authored and Pablo Neira Ayuso committed Oct 27, 2014
1 parent b51d3fa commit 7965ee9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion net/netfilter/nft_compat.c
Original file line number Diff line number Diff line change
Expand Up @@ -672,7 +672,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 &&
Expand Down

0 comments on commit 7965ee9

Please sign in to comment.