]> git.ipfire.org Git - thirdparty/nftables.git/commitdiff
monitor: print "dormant" flag in monitor mode
authorFlorian Westphal <fw@strlen.de>
Tue, 14 Jul 2020 16:33:59 +0000 (18:33 +0200)
committerFlorian Westphal <fw@strlen.de>
Sat, 18 Jul 2020 13:28:01 +0000 (15:28 +0200)
This distinction is important: a table with this flag is inert -- all
base chains are unregistered and see no traffic.

Signed-off-by: Florian Westphal <fw@strlen.de>
src/monitor.c

index bb269c02950c9017ee5b9f96bc6fe61859c88812..3872ebcfbdaf649febc10cfba4f5b910e45d2425 100644 (file)
@@ -214,6 +214,10 @@ static int netlink_events_table_cb(const struct nlmsghdr *nlh, int type,
 
                nft_mon_print(monh, "%s %s", family2str(t->handle.family),
                              t->handle.table.name);
+
+               if (t->flags & TABLE_F_DORMANT)
+                       nft_mon_print(monh, " { flags dormant; }");
+
                if (nft_output_handle(&monh->ctx->nft->output))
                        nft_mon_print(monh, " # handle %" PRIu64 "",
                                      t->handle.handle.id);