Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

netfilter: nf_tables: fix chain filter in nf_tables_dump_rules()

ctx->chain may be null now that we have very large object names,
so we cannot check for ctx->chain[0] here.

Fixes: b7263e071aba7 ("netfilter: nf_tables: Allow table names of up to 255 chars")
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Acked-by: Phil Sutter <phil@nwl.cc>

+1 -1
+1 -1
net/netfilter/nf_tables_api.c
··· 2072 2072 continue; 2073 2073 2074 2074 list_for_each_entry_rcu(chain, &table->chains, list) { 2075 - if (ctx && ctx->chain[0] && 2075 + if (ctx && ctx->chain && 2076 2076 strcmp(ctx->chain, chain->name) != 0) 2077 2077 continue; 2078 2078