netfilter fixes for your net tree
Subsystems (3)
[email protected]
maintainercover netfilter fixes for your net tree
From: Pablo Neira Ayuso <[email protected]>
Hi David,
The following patchset contains Netfilter fixes for your net tree, they are:
* Don't generate audit log message if audit is not enabled, from Gao Feng.
* Fix logging formatting for packets dropped by helpers, by Joe Perches.
* Fix a compilation warning in nfnetlink if CONFIG_PROVE_RCU is not set, from Paul Bolle.
You can pull these changes from:
git://1984.lsi.us.es/nf master
Thanks!
Gao feng (1):
netfilter: xt_AUDIT: only generate audit log when audit enabled
Joe Perches (1):
netfilter: nf_ct_helper: Fix logging for dropped packets
Paul Bolle (1):
netfilter: nfnetlink: silence warning if CONFIG_PROVE_RCU isn't set
net/netfilter/nf_conntrack_helper.c | 11 ++++++++++- net/netfilter/nfnetlink.c | 7 +------ net/netfilter/xt_AUDIT.c | 3 +++ 3 files changed, 14 insertions(+), 7 deletions(-)
Signature · 1 line
1.7.10.4
[email protected]
maintainerPATCH 1/3 netfilter: nf_ct_helper: Fix logging for dropped packets
From: Joe Perches <[email protected]>
Update nf_ct_helper_log to emit args along with the format.
--- net/netfilter/nf_conntrack_helper.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-)
net/netfilter/nf_conntrack_helper.c +10 -1
@@ -341,6 +341,13 @@ void nf_ct_helper_log(struct sk_buff *skb, const struct nf_conn *ct, {const struct nf_conn_help *help;const struct nf_conntrack_helper *helper; +struct va_format vaf; +va_list args; + +va_start (args, fmt); + + vaf.fmt = fmt; + vaf.va = &args;/* Called from the helper function, this call never fails */ help =nfct_help (ct);
@@ -349,7 +356,9 @@ void nf_ct_helper_log(struct sk_buff *skb, const struct nf_conn *ct, helper =rcu_dereference (help->helper);nf_log_packet (nf_ct_l3num (ct),0 , skb,NULL ,NULL ,NULL , -"nf_ct_%s: dropping packet: %s " , helper->name, fmt); +"nf_ct_%s: dropping packet: %pV " , helper->name, &vaf); + +va_end (args); }EXPORT_SYMBOL_GPL (nf_ct_helper_log);
Signature · 1 line
1.7.10.4
[email protected]
maintainerPATCH 2/3 netfilter: xt_AUDIT: only generate audit log when audit enabled
In reply to [email protected]From: Gao feng <[email protected]>
We should stop generting audit log if audit is disabled.
--- 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.10.4
[email protected]
maintainerPATCH 3/3 netfilter: nfnetlink: silence warning if CONFIG_PROVE_RCU isn't set
In reply to [email protected]From: Paul Bolle <[email protected]>
Since commit c14b78e7decd0d1d5add6a4604feb8609fe920a9 ("netfilter:
nfnetlink: add mutex per subsystem") building nefnetlink.o withoutCONFIG_PROVE_RCU set, triggers this GCC warning:
net/netfilter/nfnetlink.c:65:22: warning: ‘nfnl_get_lock’ defined but not used [-Wunused-function]
The cause of that warning is, in short, that rcu_lockdep_assert() compiles away if CONFIG_PROVE_RCU is not set. Silence this warning by open coding nfnl_get_lock() in the sole place it was called, which allows to remove that function.
--- net/netfilter/nfnetlink.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-)
net/netfilter/nfnetlink.c +1 -6
@@ -62,11 +62,6 @@ void nfnl_unlock(__u8 subsys_id) }EXPORT_SYMBOL_GPL (nfnl_unlock); -static struct mutex *nfnl_get_lock (__u8 subsys_id) -{ -return &table[subsys_id].mutex; -} -int nfnetlink_subsys_register (const struct nfnetlink_subsystem *n) {nfnl_lock (n->subsys_id);
@@ -199,7 +194,7 @@ replay:rcu_read_unlock ();nfnl_lock (subsys_id);if (rcu_dereference_protected (table[subsys_id].subsys, -lockdep_is_held (nfnl_get_lock (subsys_id))) != ss || +lockdep_is_held (&table[subsys_id].mutex)) != ss ||nfnetlink_find_client (type, ss) != nc) err = -EAGAIN ;else if (nc->call)
Signature · 1 line
1.7.10.4
From: [email protected]
Date: Thu, 7 Mar 2013 11:59:59 +0100
Quoted 5 lines
The following patchset contains Netfilter fixes for your net tree, they are:
* Don't generate audit log message if audit is not enabled, from Gao Feng.
Quoted 8 lines
* Fix logging formatting for packets dropped by helpers, by Joe Perches.
* Fix a compilation warning in nfnetlink if
CONFIG_PROVE_RCUis not set, from Paul Bolle.You can pull these changes from:
git://1984.lsi.us.es/nfmaster
Pulled, but keep in mind that if there are any bugs in these changes I know exactly where you are. :-)