monitor: print "dormant" flag in monitor mode
Florian Westphal
maintainerPATCH 1/2 monitor: print "dormant" flag in monitor mode
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 <[email protected]>
--- src/monitor.c | 4 ++++ 1 file changed, 4 insertions(+)
src/monitor.c +4 -0
@@ -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);
Signature · 1 line
2.26.2
Florian Westphal
maintainerPATCH 2/2 tests: extend existing dormat test case to catch a kernel bug
This is a test case for the kernel bug fixed by:
netfilter: nf_tables: fix nat hook table deletion
Signed-off-by Florian Westphal <[email protected]>
--- tests/shell/testcases/transactions/0002table_0 | 1 + tests/shell/testcases/transactions/dumps/0002table_0.nft | 4 ++++ 2 files changed, 5 insertions(+)
tests/shell/testcases/transactions/0002table_0 +1 -0
@@ -5,6 +5,7 @@ set -e RULESET="add table x delete table x add table x +add chain x y { type nat hook prerouting priority 0; policy accept; } add table x { flags dormant; }" $NFT -f - <<< "$RULESET"
tests/shell/testcases/transactions/dumps/0002table_0.nft +4 -0
@@ -1,3 +1,7 @@ table ip x { flags dormant + + chain y { + type nat hook prerouting priority filter; policy accept; + } }
Signature · 1 line
2.26.2