diff options
author | Nicolas Dichtel <nicolas.dichtel@6wind.com> | 2014-09-08 08:11:45 -0400 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2014-09-09 10:31:28 -0400 |
commit | c55fbbb4a730e3d6e1727b7de08b39e6cd847fad (patch) | |
tree | 9c3b7d14f7982d94e7d064828dbd8e817b29ba61 /net/bridge | |
parent | e42eff8a32f8b7bde88ea3c5a56391407cbe84f3 (diff) |
netfilter: ebtables: create audit records for replaces
This is already done for x_tables (family AF_INET and AF_INET6), let's
do it for AF_BRIDGE also.
Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'net/bridge')
-rw-r--r-- | net/bridge/netfilter/ebtables.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/net/bridge/netfilter/ebtables.c b/net/bridge/netfilter/ebtables.c index 6d69631b9f4d..d9a8c05d995d 100644 --- a/net/bridge/netfilter/ebtables.c +++ b/net/bridge/netfilter/ebtables.c | |||
@@ -26,6 +26,7 @@ | |||
26 | #include <asm/uaccess.h> | 26 | #include <asm/uaccess.h> |
27 | #include <linux/smp.h> | 27 | #include <linux/smp.h> |
28 | #include <linux/cpumask.h> | 28 | #include <linux/cpumask.h> |
29 | #include <linux/audit.h> | ||
29 | #include <net/sock.h> | 30 | #include <net/sock.h> |
30 | /* needed for logical [in,out]-dev filtering */ | 31 | /* needed for logical [in,out]-dev filtering */ |
31 | #include "../br_private.h" | 32 | #include "../br_private.h" |
@@ -1058,6 +1059,20 @@ static int do_replace_finish(struct net *net, struct ebt_replace *repl, | |||
1058 | vfree(table); | 1059 | vfree(table); |
1059 | 1060 | ||
1060 | vfree(counterstmp); | 1061 | vfree(counterstmp); |
1062 | |||
1063 | #ifdef CONFIG_AUDIT | ||
1064 | if (audit_enabled) { | ||
1065 | struct audit_buffer *ab; | ||
1066 | |||
1067 | ab = audit_log_start(current->audit_context, GFP_KERNEL, | ||
1068 | AUDIT_NETFILTER_CFG); | ||
1069 | if (ab) { | ||
1070 | audit_log_format(ab, "table=%s family=%u entries=%u", | ||
1071 | repl->name, AF_BRIDGE, repl->nentries); | ||
1072 | audit_log_end(ab); | ||
1073 | } | ||
1074 | } | ||
1075 | #endif | ||
1061 | return ret; | 1076 | return ret; |
1062 | 1077 | ||
1063 | free_unlock: | 1078 | free_unlock: |