From 2d90a9e1bf69ed305fe5192a58aaa7b299edae45 Mon Sep 17 00:00:00 2001 From: Pablo Neira Ayuso Date: Mon, 5 Mar 2018 17:01:19 +0100 Subject: netlink: print chain handle with --echo --handle # nft add --echo --handle chain x y add chain ip x y # handle 1 Signed-off-by: Pablo Neira Ayuso --- src/rule.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/rule.c b/src/rule.c index d58e58f1..99a99e8a 100644 --- a/src/rule.c +++ b/src/rule.c @@ -766,6 +766,8 @@ void chain_print_plain(const struct chain *chain, struct output_ctx *octx) chain->type, chain->hookstr, chain->priority, chain_policy2str(chain->policy)); } + if (octx->handle > 0) + nft_print(octx, " # handle %" PRIu64, chain->handle.handle.id); nft_print(octx, "\n"); } -- cgit v1.2.3