]> git.ipfire.org Git - thirdparty/nftables.git/commitdiff
monitor: display rule position handle
authorPablo Neira Ayuso <pablo@netfilter.org>
Mon, 20 Sep 2021 16:52:18 +0000 (18:52 +0200)
committerPablo Neira Ayuso <pablo@netfilter.org>
Wed, 29 Sep 2021 16:59:44 +0000 (18:59 +0200)
This allow to locate the incremental update in the ruleset.

Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
src/monitor.c

index 144fe96c28980336ab0eff31551b24f8eaae7a7f..ffaa39b673045cc635f02005322e2f95790d845a 100644 (file)
@@ -541,7 +541,10 @@ static int netlink_events_rule_cb(const struct nlmsghdr *nlh, int type,
                              family,
                              r->handle.table.name,
                              r->handle.chain.name);
-
+               if (r->handle.position.id) {
+                       nft_mon_print(monh, "handle %" PRIu64" ",
+                                     r->handle.position.id);
+               }
                switch (type) {
                case NFT_MSG_NEWRULE:
                        rule_print(r, &monh->ctx->nft->output);