diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/netlink.c | 3 | ||||
| -rw-r--r-- | src/rule.c | 9 |
2 files changed, 9 insertions, 3 deletions
diff --git a/src/netlink.c b/src/netlink.c index 68f1b90c..b5c092b4 100644 --- a/src/netlink.c +++ b/src/netlink.c @@ -1139,6 +1139,9 @@ struct set *netlink_delinearize_set(struct netlink_ctx *ctx, if (nftnl_set_is_set(nls, NFTNL_SET_DESC_SIZE)) set->desc.size = nftnl_set_get_u32(nls, NFTNL_SET_DESC_SIZE); + if (nftnl_set_is_set(nls, NFTNL_SET_COUNT)) + set->count = nftnl_set_get_u32(nls, NFTNL_SET_COUNT); + if (nftnl_set_is_set(nls, NFTNL_SET_DESC_CONCAT)) { uint32_t len = NFT_REG32_COUNT; const uint8_t *data; @@ -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); } } |
