summaryrefslogtreecommitdiff
path: root/net/netfilter
diff options
context:
space:
mode:
authorGeliang Tang <geliangtang@gmail.com>2017-08-07 21:44:25 +0800
committerPablo Neira Ayuso <pablo@netfilter.org>2017-08-19 13:09:31 +0200
commit46b20c38f37c48bbcb832f933e1bee7d951da99b (patch)
tree3d44a04e5e7e9f09bbe8a6f8109c59c24a860082 /net/netfilter
parent166327d79d8d44a1668eff0fda8286e9a193a251 (diff)
netfilter: use audit_log()
Use audit_log() instead of open-coding it. Signed-off-by: Geliang Tang <geliangtang@gmail.com> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'net/netfilter')
-rw-r--r--net/netfilter/x_tables.c14
1 files changed, 4 insertions, 10 deletions
diff --git a/net/netfilter/x_tables.c b/net/netfilter/x_tables.c
index e1648238a9c9..c83a3b5e1c6c 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