# nft --echo --handle add counter x y add counter ip x y { packets 0 bytes 0 } # handle 0 Signed-off-by: Pablo Neira Ayuso <pablo@xxxxxxxxxxxxx> --- src/rule.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/rule.c b/src/rule.c index 99a99e8a3f9d..6af7d9a913fe 100644 --- a/src/rule.c +++ b/src/rule.c @@ -1503,6 +1503,9 @@ static void obj_print_declaration(const struct obj *obj, obj_print_data(obj, opts, octx); nft_print(octx, "%s%s}%s", opts->nl, opts->tab, opts->nl); + + if (octx->handle > 0) + nft_print(octx, "# handle %" PRIu64, obj->handle.handle.id); } void obj_print(const struct obj *obj, struct output_ctx *octx) -- 2.11.0 -- To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html