* [PATCH] netfilter: ebtables: use audit_log()
[not found] <5f901760510d0dc6e6e971d4136c8d2d4e0a13fd.1502103408.git.geliangtang@gmail.com>
@ 2017-08-07 13:44 ` Geliang Tang
2017-08-19 11:25 ` Pablo Neira Ayuso
2017-08-07 13:44 ` [PATCH] netfilter: xtables: " Geliang Tang
1 sibling, 1 reply; 4+ messages in thread
From: Geliang Tang @ 2017-08-07 13:44 UTC (permalink / raw)
To: Pablo Neira Ayuso, Jozsef Kadlecsik, Florian Westphal,
Stephen Hemminger, David S. Miller
Cc: Geliang Tang, netfilter-devel, coreteam, bridge, netdev,
linux-kernel
Use audit_log() instead of open-coding it.
Signed-off-by: Geliang Tang <geliangtang@gmail.com>
---
net/bridge/netfilter/ebtables.c | 13 ++++---------
1 file changed, 4 insertions(+), 9 deletions(-)
diff --git a/net/bridge/netfilter/ebtables.c b/net/bridge/netfilter/ebtables.c
index 9c6e619..54c7ef4 100644
--- a/net/bridge/netfilter/ebtables.c
+++ b/net/bridge/netfilter/ebtables.c
@@ -1069,15 +1069,10 @@ static int do_replace_finish(struct net *net, struct ebt_replace *repl,
#ifdef CONFIG_AUDIT
if (audit_enabled) {
- struct audit_buffer *ab;
-
- ab = audit_log_start(current->audit_context, GFP_KERNEL,
- AUDIT_NETFILTER_CFG);
- if (ab) {
- audit_log_format(ab, "table=%s family=%u entries=%u",
- repl->name, AF_BRIDGE, repl->nentries);
- audit_log_end(ab);
- }
+ audit_log(current->audit_context, GFP_KERNEL,
+ AUDIT_NETFILTER_CFG,
+ "table=%s family=%u entries=%u",
+ repl->name, AF_BRIDGE, repl->nentries);
}
#endif
return ret;
--
2.9.3
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH] netfilter: xtables: use audit_log()
[not found] <5f901760510d0dc6e6e971d4136c8d2d4e0a13fd.1502103408.git.geliangtang@gmail.com>
2017-08-07 13:44 ` [PATCH] netfilter: ebtables: use audit_log() Geliang Tang
@ 2017-08-07 13:44 ` Geliang Tang
2017-08-19 11:25 ` Pablo Neira Ayuso
1 sibling, 1 reply; 4+ messages in thread
From: Geliang Tang @ 2017-08-07 13:44 UTC (permalink / raw)
To: Pablo Neira Ayuso, Jozsef Kadlecsik, Florian Westphal,
David S. Miller
Cc: Geliang Tang, netfilter-devel, coreteam, netdev, linux-kernel
Use audit_log() instead of open-coding it.
Signed-off-by: Geliang Tang <geliangtang@gmail.com>
---
net/netfilter/x_tables.c | 14 ++++----------
1 file changed, 4 insertions(+), 10 deletions(-)
diff --git a/net/netfilter/x_tables.c b/net/netfilter/x_tables.c
index e164823..c83a3b5 100644
--- a/net/netfilter/x_tables.c
+++ b/net/netfilter/x_tables.c
@@ -1192,16 +1192,10 @@ xt_replace_table(struct xt_table *table,
#ifdef CONFIG_AUDIT
if (audit_enabled) {
- struct audit_buffer *ab;
-
- ab = audit_log_start(current->audit_context, GFP_KERNEL,
- AUDIT_NETFILTER_CFG);
- if (ab) {
- audit_log_format(ab, "table=%s family=%u entries=%u",
- table->name, table->af,
- private->number);
- audit_log_end(ab);
- }
+ audit_log(current->audit_context, GFP_KERNEL,
+ AUDIT_NETFILTER_CFG,
+ "table=%s family=%u entries=%u",
+ table->name, table->af, private->number);
}
#endif
--
2.9.3
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] netfilter: ebtables: use audit_log()
2017-08-07 13:44 ` [PATCH] netfilter: ebtables: use audit_log() Geliang Tang
@ 2017-08-19 11:25 ` Pablo Neira Ayuso
0 siblings, 0 replies; 4+ messages in thread
From: Pablo Neira Ayuso @ 2017-08-19 11:25 UTC (permalink / raw)
To: Geliang Tang
Cc: netdev, bridge, Florian Westphal, linux-kernel, coreteam,
netfilter-devel, Jozsef Kadlecsik, David S. Miller
On Mon, Aug 07, 2017 at 09:44:25PM +0800, Geliang Tang wrote:
> Use audit_log() instead of open-coding it.
Applied, thanks.
BTW, I have collapse your xtables change to this patch too. part of
the same logical change. Hint: If you see yourself writing exactly the
same description for each patch you submit then it's likely to be fine
to merge them into one single patch. Just for the next time.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] netfilter: xtables: use audit_log()
2017-08-07 13:44 ` [PATCH] netfilter: xtables: " Geliang Tang
@ 2017-08-19 11:25 ` Pablo Neira Ayuso
0 siblings, 0 replies; 4+ messages in thread
From: Pablo Neira Ayuso @ 2017-08-19 11:25 UTC (permalink / raw)
To: Geliang Tang
Cc: Jozsef Kadlecsik, Florian Westphal, David S. Miller,
netfilter-devel, coreteam, netdev, linux-kernel
On Mon, Aug 07, 2017 at 09:44:26PM +0800, Geliang Tang wrote:
> Use audit_log() instead of open-coding it.
As said, collapsed into 'netfilter: ebtables: use audit_log()', just
for the record.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2017-08-19 11:25 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <5f901760510d0dc6e6e971d4136c8d2d4e0a13fd.1502103408.git.geliangtang@gmail.com>
2017-08-07 13:44 ` [PATCH] netfilter: ebtables: use audit_log() Geliang Tang
2017-08-19 11:25 ` Pablo Neira Ayuso
2017-08-07 13:44 ` [PATCH] netfilter: xtables: " Geliang Tang
2017-08-19 11:25 ` Pablo Neira Ayuso
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).