[PATCH 1/2] src: Print handle attribute in chains

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Print handle attribute in chains when listing via '-a' option.

Signed-off-by: Harsha Sharma <harshasharmaiitr@xxxxxxxxx>
---
 src/rule.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/src/rule.c b/src/rule.c
index e875816..7d66c22 100644
--- a/src/rule.c
+++ b/src/rule.c
@@ -694,7 +694,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)
-- 
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



[Index of Archives]     [Netfitler Users]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux