aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorJoe Perches <joe@perches.com>2013-02-18 16:51:07 -0500
committerPablo Neira Ayuso <pablo@netfilter.org>2013-03-02 16:44:45 -0500
commitf9caed59f801f77a2844ab04d2dea8df33ac862b (patch)
treeac8f191a9df83cd7911a6434634d989f9eb77210 /net
parent114a6f8b52163c0232fbcd7f3808ff04dc61a9b5 (diff)
netfilter: nf_ct_helper: Fix logging for dropped packets
Update nf_ct_helper_log to emit args along with the format. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'net')
-rw-r--r--net/netfilter/nf_conntrack_helper.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/net/netfilter/nf_conntrack_helper.c b/net/netfilter/nf_conntrack_helper.c
index 013cdf69fe29..bb4188f170e3 100644
--- a/net/netfilter/nf_conntrack_helper.c
+++ b/net/netfilter/nf_conntrack_helper.c
@@ -341,6 +341,13 @@ void nf_ct_helper_log(struct sk_buff *skb, const struct nf_conn *ct,
341{ 341{
342 const struct nf_conn_help *help; 342 const struct nf_conn_help *help;
343 const struct nf_conntrack_helper *helper; 343 const struct nf_conntrack_helper *helper;
344 struct va_format vaf;
345 va_list args;
346
347 va_start(args, fmt);
348
349 vaf.fmt = fmt;
350 vaf.va = &args;
344 351
345 /* Called from the helper function, this call never fails */ 352 /* Called from the helper function, this call never fails */
346 help = nfct_help(ct); 353 help = nfct_help(ct);
@@ -349,7 +356,9 @@ void nf_ct_helper_log(struct sk_buff *skb, const struct nf_conn *ct,
349 helper = rcu_dereference(help->helper); 356 helper = rcu_dereference(help->helper);
350 357
351 nf_log_packet(nf_ct_l3num(ct), 0, skb, NULL, NULL, NULL, 358 nf_log_packet(nf_ct_l3num(ct), 0, skb, NULL, NULL, NULL,
352 "nf_ct_%s: dropping packet: %s ", helper->name, fmt); 359 "nf_ct_%s: dropping packet: %pV ", helper->name, &vaf);
360
361 va_end(args);
353} 362}
354EXPORT_SYMBOL_GPL(nf_ct_helper_log); 363EXPORT_SYMBOL_GPL(nf_ct_helper_log);
355 364