summaryrefslogtreecommitdiffstats
path: root/src/rule.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/rule.c')
-rw-r--r--src/rule.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/rule.c b/src/rule.c
index 1bf0e03e..fa3d4c11 100644
--- a/src/rule.c
+++ b/src/rule.c
@@ -984,8 +984,18 @@ static int do_list_sets(struct netlink_ctx *ctx, struct cmd *cmd)
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;
}