From: Phil Sutter <phil@nwl.cc>
To: netfilter-devel@vger.kernel.org
Cc: Florian Westphal <fw@strlen.de>, Pablo Neira Ayuso <pablo@netfilter.org>
Subject: [iptables PATCH 3/8] xtables-monitor: Align builtin chain and table output
Date: Tue, 16 Jul 2024 14:28:00 +0200 [thread overview]
Message-ID: <20240716122805.22331-4-phil@nwl.cc> (raw)
In-Reply-To: <20240716122805.22331-1-phil@nwl.cc>
Drop the leading hash sign and add "NEW/DEL chain" annotation.
Signed-off-by: Phil Sutter <phil@nwl.cc>
---
iptables/xtables-monitor.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/iptables/xtables-monitor.c b/iptables/xtables-monitor.c
index 90d1cc5e37f31..e136e9b722e92 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;
}
--
2.43.0
next prev parent reply other threads:[~2024-07-16 12:28 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-07-16 12:27 [iptables PATCH 0/8] Fix xtables-monitor rule printing, partially RFC Phil Sutter
2024-07-16 12:27 ` [iptables PATCH 1/8] xtables-monitor: Proper re-init for rule's family Phil Sutter
2024-07-16 12:27 ` [iptables PATCH 2/8] xtables-monitor: Flush stdout after all lines of output Phil Sutter
2024-07-16 12:28 ` Phil Sutter [this message]
2024-07-16 12:28 ` [iptables PATCH 4/8] xtables-monitor: Support arptables chain events Phil Sutter
2024-07-16 12:28 ` [iptables PATCH 5/8] tests: shell: New xtables-monitor test Phil Sutter
2024-07-16 12:28 ` [iptables PATCH 6/8] xtables-monitor: Fix for ebtables rule events Phil Sutter
2024-07-16 12:28 ` [iptables PATCH 7/8] xtables-monitor: Ignore ebtables policy rules unless tracing Phil Sutter
2024-07-16 12:28 ` [RFC iptables PATCH 8/8] xtables-monitor: Print commands instead of -4/-6/-0 flags Phil Sutter
2024-07-27 12:33 ` [iptables PATCH 0/8] Fix xtables-monitor rule printing, partially RFC Phil Sutter
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240716122805.22331-4-phil@nwl.cc \
--to=phil@nwl.cc \
--cc=fw@strlen.de \
--cc=netfilter-devel@vger.kernel.org \
--cc=pablo@netfilter.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.