History

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.

Pablo Neira Ayuso committed 8 years ago

Commit 24c0df81 parent b4681c21 file · +1 −1Browse files

Unified · Split

net/netfilter/nf_tables_api.c+1−1
@@ -2072,7 +2072,7 @@ static int nf_tables_dump_rules(struct sk_buff *skb, · 2071 unmodified lines
2072 continue;2072 continue;
2073 2073
2074 list_for_each_entry_rcu(chain, &table->chains, list) {2074 list_for_each_entry_rcu(chain, &table->chains, list) {
2075 if (ctx && ctx->chain[0] &&2075 if (ctx && ctx->chain &&
2076 strcmp(ctx->chain, chain->name) != 0)2076 strcmp(ctx->chain, chain->name) != 0)
2077 continue;2077 continue;
2078 2078