提交 24c0df82 编写于 作者: P Pablo Neira Ayuso

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: b7263e07 ("netfilter: nf_tables: Allow table names of up to 255 chars")
Signed-off-by: NPablo Neira Ayuso <pablo@netfilter.org>
Acked-by: NPhil Sutter <phil@nwl.cc>
上级 b4681c28
...@@ -2072,7 +2072,7 @@ static int nf_tables_dump_rules(struct sk_buff *skb, ...@@ -2072,7 +2072,7 @@ static int nf_tables_dump_rules(struct sk_buff *skb,
continue; continue;
list_for_each_entry_rcu(chain, &table->chains, list) { list_for_each_entry_rcu(chain, &table->chains, list) {
if (ctx && ctx->chain[0] && if (ctx && ctx->chain &&
strcmp(ctx->chain, chain->name) != 0) strcmp(ctx->chain, chain->name) != 0)
continue; continue;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册