netfilter: xt_AUDIT: only generate audit log when audit enabled
Subsystems (2)
PATCH 1/1 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 <[email protected]>
--- net/netfilter/xt_AUDIT.c | 3 +++ 1 file changed, 3 insertions(+)
net/netfilter/xt_AUDIT.c +3 -0
@@ -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;
Signature · 1 line
1.7.11.7
Quoted 3 lines · Gao feng
We should stop generting audit log if audit is disabled.
Signed-off-by Gao feng <[email protected]>
Acked-by Thomas Graf <[email protected]>
Quoted 1 line · Gao feng
We should stop generting audit log if audit is disabled.
Applied, thanks Gao and Thomas.