mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-24 04:34:08 +08:00
netfilter: xt_AUDIT: only generate audit log when audit enabled
We should stop generting audit log if audit is disabled. Signed-off-by: Gao feng <gaofeng@cn.fujitsu.com> Acked-by: Thomas Graf <tgraf@suug.ch> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
This commit is contained in:
parent
f9caed59f8
commit
ed018fa4df
@ -124,6 +124,9 @@ audit_tg(struct sk_buff *skb, const struct xt_action_param *par)
|
||||
const struct xt_audit_info *info = par->targinfo;
|
||||
struct audit_buffer *ab;
|
||||
|
||||
if (audit_enabled == 0)
|
||||
goto errout;
|
||||
|
||||
ab = audit_log_start(NULL, GFP_ATOMIC, AUDIT_NETFILTER_PKT);
|
||||
if (ab == NULL)
|
||||
goto errout;
|
||||
|
Loading…
Reference in New Issue
Block a user