After this patch:
# nft list sets ip
table ip test {
set pepe {
type ipv4_addr
}
}
Before:
# nft list sets ip
set pepe {
type ipv4_addr
}
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Acked-by: Arturo Borrero Gonzalez <arturo.borrero.glez@gmail.com>
struct set *set;
list_for_each_entry(table, &table_list, list) {
+ if (cmd->handle.family != NFPROTO_UNSPEC &&
+ cmd->handle.family != table->handle.family)
+ continue;
+
+ printf("table %s %s {\n",
+ family2str(table->handle.family),
+ table->handle.table);
+
list_for_each_entry(set, &table->sets, list)
set_print(set);
+
+ printf("}\n");
}
return 0;
}