summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPablo Neira Ayuso <pablo@netfilter.org>2018-03-05 17:01:19 +0100
committerPablo Neira Ayuso <pablo@netfilter.org>2018-03-05 17:04:03 +0100
commit2d90a9e1bf69ed305fe5192a58aaa7b299edae45 (patch)
treed47a826f6c1e30b90ebd7406b21d2e8c1047e504 /src
parent72af184f146829a8bf8d0c9d68f990e9e030ec0f (diff)
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 <pablo@netfilter.org>
Diffstat (limited to 'src')
-rw-r--r--src/rule.c2
1 files changed, 2 insertions, 0 deletions
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");
}