* [PATCH] netfilter: xt_AUDIT: only generate audit log when audit enabled
@ 2013-03-04 10:29 Gao feng
2013-03-04 10:50 ` Thomas Graf
2013-03-04 15:54 ` Pablo Neira Ayuso
0 siblings, 2 replies; 3+ messages in thread
From: Gao feng @ 2013-03-04 10:29 UTC (permalink / raw)
To: netfilter-devel; +Cc: tgraf, Gao feng
We should stop generting audit log if audit is disabled.
Signed-off-by: Gao feng <gaofeng@cn.fujitsu.com>
---
net/netfilter/xt_AUDIT.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/net/netfilter/xt_AUDIT.c b/net/netfilter/xt_AUDIT.c
index ba92824..3228d7f 100644
--- a/net/netfilter/xt_AUDIT.c
+++ b/net/netfilter/xt_AUDIT.c
@@ -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;
--
1.7.11.7
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] netfilter: xt_AUDIT: only generate audit log when audit enabled
2013-03-04 10:29 [PATCH] netfilter: xt_AUDIT: only generate audit log when audit enabled Gao feng
@ 2013-03-04 10:50 ` Thomas Graf
2013-03-04 15:54 ` Pablo Neira Ayuso
1 sibling, 0 replies; 3+ messages in thread
From: Thomas Graf @ 2013-03-04 10:50 UTC (permalink / raw)
To: Gao feng; +Cc: netfilter-devel
On 03/04/13 at 06:29pm, Gao feng wrote:
> 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>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] netfilter: xt_AUDIT: only generate audit log when audit enabled
2013-03-04 10:29 [PATCH] netfilter: xt_AUDIT: only generate audit log when audit enabled Gao feng
2013-03-04 10:50 ` Thomas Graf
@ 2013-03-04 15:54 ` Pablo Neira Ayuso
1 sibling, 0 replies; 3+ messages in thread
From: Pablo Neira Ayuso @ 2013-03-04 15:54 UTC (permalink / raw)
To: Gao feng; +Cc: netfilter-devel, tgraf
On Mon, Mar 04, 2013 at 06:29:12PM +0800, Gao feng wrote:
> We should stop generting audit log if audit is disabled.
Applied, thanks Gao and Thomas.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2013-03-04 15:55 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-03-04 10:29 [PATCH] netfilter: xt_AUDIT: only generate audit log when audit enabled Gao feng
2013-03-04 10:50 ` Thomas Graf
2013-03-04 15:54 ` Pablo Neira Ayuso
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).