From mboxrd@z Thu Jan 1 00:00:00 1970 From: Florian Westphal Subject: Re: [PATCH ghak25 v2 8/9] netfilter: add audit operation field Date: Mon, 6 Jan 2020 21:23:06 +0100 Message-ID: <20200106202306.GO795@breakpoint.cc> References: <6768f7c7d9804216853e6e9c59e44f8a10f46b99.1577830902.git.rgb@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline In-Reply-To: <6768f7c7d9804216853e6e9c59e44f8a10f46b99.1577830902.git.rgb@redhat.com> Sender: linux-kernel-owner@vger.kernel.org To: Richard Guy Briggs Cc: Linux-Audit Mailing List , LKML , netfilter-devel@vger.kernel.org, Paul Moore , sgrubb@redhat.com, omosnace@redhat.com, fw@strlen.de, twoerner@redhat.com, eparis@parisplace.org, ebiederm@xmission.com, tgraf@infradead.org List-Id: linux-audit@redhat.com Richard Guy Briggs wrote: > diff --git a/include/linux/audit.h b/include/linux/audit.h > index 96cabb095eed..5eab4d898c26 100644 > --- a/include/linux/audit.h > +++ b/include/linux/audit.h > @@ -379,7 +379,7 @@ extern int __audit_log_bprm_fcaps(struct linux_binprm *bprm, > extern void __audit_fanotify(unsigned int response); > extern void __audit_tk_injoffset(struct timespec64 offset); > extern void __audit_ntp_log(const struct audit_ntp_data *ad); > -extern void __audit_nf_cfg(const char *name, u8 af, int nentries); > +extern void __audit_nf_cfg(const char *name, u8 af, int nentries, int op); Consider adding an enum instead of int op. > if (audit_enabled) > - audit_nf_cfg(repl->name, AF_BRIDGE, repl->nentries); > + audit_nf_cfg(repl->name, AF_BRIDGE, repl->nentries, 1); audit_nf_cfg(repl->name, AF_BRIDGE, repl->nentries, AUDIT_XT_OP_REPLACE); ... would be a bit more readable than '1'. The name is just an example, you can pick something else.