]> Git Repo - linux.git/commitdiff
netfilter: xt_AUDIT: only generate audit log when audit enabled
authorGao feng <[email protected]>
Mon, 4 Mar 2013 00:29:12 +0000 (00:29 +0000)
committerPablo Neira Ayuso <[email protected]>
Mon, 4 Mar 2013 13:45:25 +0000 (14:45 +0100)
We should stop generting audit log if audit is disabled.

Signed-off-by: Gao feng <[email protected]>
Acked-by: Thomas Graf <[email protected]>
Signed-off-by: Pablo Neira Ayuso <[email protected]>
net/netfilter/xt_AUDIT.c

index ba92824086f3c3843c7158c5a5de86fe0db53dc4..3228d7f24eb4107ff717af4323e834af3e680797 100644 (file)
@@ -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;
This page took 0.051094 seconds and 4 git commands to generate.