From: Harsha Sharma Date: Tue, 9 Jan 2018 18:59:01 +0000 (+0530) Subject: src: Print handle attribute in chains X-Git-Tag: v0.8.4~120 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=51a087822e14d29bfbfd87892b792169d78d9863;p=thirdparty%2Fnftables.git src: Print handle attribute in chains Print handle attribute in chains when listing via '-a' option. Signed-off-by: Harsha Sharma Signed-off-by: Pablo Neira Ayuso --- diff --git a/src/rule.c b/src/rule.c index 52b6adac..29343f75 100644 --- a/src/rule.c +++ b/src/rule.c @@ -746,7 +746,10 @@ static void chain_print(const struct chain *chain, struct output_ctx *octx) rule_print(rule, octx); nft_print(octx, "\n"); } - nft_print(octx, "\t}\n"); + nft_print(octx, "\t}"); + if (octx->handle > 0) + nft_print(octx, " # handle %" PRIu64, chain->handle.handle.id); + nft_print(octx, "\n"); } void chain_print_plain(const struct chain *chain, struct output_ctx *octx)