From 91487a80551ea91714082da41aa49ba52dd6e9bb Mon Sep 17 00:00:00 2001 From: Eric Jallot Date: Mon, 4 Nov 2019 21:23:59 +0100 Subject: src: flowtable: add support for delete command by handle Also, display handle when listing with '-a'. Signed-off-by: Eric Jallot Signed-off-by: Pablo Neira Ayuso --- src/rule.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/rule.c') diff --git a/src/rule.c b/src/rule.c index a2811d18..ff9e8e6c 100644 --- a/src/rule.c +++ b/src/rule.c @@ -2156,8 +2156,11 @@ static void flowtable_print_declaration(const struct flowtable *flowtable, if (opts->table != NULL) nft_print(octx, " %s", opts->table); - nft_print(octx, " %s {%s", flowtable->handle.flowtable.name, opts->nl); + nft_print(octx, " %s {", flowtable->handle.flowtable.name); + if (nft_output_handle(octx)) + nft_print(octx, " # handle %" PRIu64, flowtable->handle.handle.id); + nft_print(octx, "%s", opts->nl); nft_print(octx, "%s%shook %s priority %s%s", opts->tab, opts->tab, hooknum2str(NFPROTO_NETDEV, flowtable->hooknum), -- cgit v1.2.3