diff options
author | Phil Sutter <phil@nwl.cc> | 2024-07-12 13:37:12 +0200 |
---|---|---|
committer | Phil Sutter <phil@nwl.cc> | 2024-07-27 14:32:39 +0200 |
commit | 90fb6635c8b7d1ad22108d838105c01c17a5de44 (patch) | |
tree | cc46dddfce6d4ff5170996ce5896271ee59563ba | |
parent | 69da16a7790048a176a44530eb57e4b60184ce6e (diff) |
xtables-monitor: Align builtin chain and table output
Drop the leading hash sign and add "NEW/DEL chain" annotation.
Signed-off-by: Phil Sutter <phil@nwl.cc>
-rw-r--r-- | iptables/xtables-monitor.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/iptables/xtables-monitor.c b/iptables/xtables-monitor.c index 90d1cc5e..e136e9b7 100644 --- a/iptables/xtables-monitor.c +++ b/iptables/xtables-monitor.c @@ -153,7 +153,8 @@ static int chain_cb(const struct nlmsghdr *nlh, void *data) break; default: nftnl_chain_snprintf(buf, sizeof(buf), c, NFTNL_OUTPUT_DEFAULT, 0); - printf("# nft: %s\n", buf); + printf("nft: %s chain: %s\n", + type == NFT_MSG_NEWCHAIN ? "NEW" : "DEL", buf); goto err_free; } |