summaryrefslogtreecommitdiffstats
path: root/src/rule.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/rule.c')
-rw-r--r--src/rule.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/rule.c b/src/rule.c
index e2fe0979..0945d14a 100644
--- a/src/rule.c
+++ b/src/rule.c
@@ -335,10 +335,13 @@ static void set_print_declaration(const struct set *set,
}
if (set->desc.size > 0) {
- nft_print(octx, "%s%ssize %u%s",
+ nft_print(octx, "%s%ssize %u",
opts->tab, opts->tab,
- set->desc.size,
- opts->stmt_separator);
+ set->desc.size);
+ if (set->count > 0)
+ nft_print(octx, "%s# count %u", opts->tab,
+ set->count);
+ nft_print(octx, "%s", opts->stmt_separator);
}
}