|
@@ -23,6 +23,7 @@
|
|
|
#include <linux/mutex.h>
|
|
|
#include <linux/mm.h>
|
|
|
#include <linux/slab.h>
|
|
|
+#include <linux/audit.h>
|
|
|
#include <net/net_namespace.h>
|
|
|
|
|
|
#include <linux/netfilter/x_tables.h>
|
|
@@ -834,6 +835,21 @@ xt_replace_table(struct xt_table *table,
|
|
|
*/
|
|
|
local_bh_enable();
|
|
|
|
|
|
+#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);
|
|
|
+ }
|
|
|
+ }
|
|
|
+#endif
|
|
|
+
|
|
|
return private;
|
|
|
}
|
|
|
EXPORT_SYMBOL_GPL(xt_replace_table);
|