]> Git Repo - linux.git/commitdiff
Merge branch 'master' of git://1984.lsi.us.es/nf
authorDavid S. Miller <[email protected]>
Thu, 7 Mar 2013 20:20:02 +0000 (15:20 -0500)
committerDavid S. Miller <[email protected]>
Thu, 7 Mar 2013 20:20:02 +0000 (15:20 -0500)
Pablo Neira Ayuso says:

====================
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.
====================

Signed-off-by: David S. Miller <[email protected]>
1  2 
net/netfilter/nf_conntrack_helper.c

index a9740bd6fe543bc5d93a05296d9c0dd0260c340b,bb4188f170e3948a86379c32faa215658d7d015b..94b4b9853f60488a1aa9b12ff9e96cac3c90d4d2
@@@ -116,13 -116,14 +116,13 @@@ __nf_ct_helper_find(const struct nf_con
  {
        struct nf_conntrack_helper *helper;
        struct nf_conntrack_tuple_mask mask = { .src.u.all = htons(0xFFFF) };
 -      struct hlist_node *n;
        unsigned int h;
  
        if (!nf_ct_helper_count)
                return NULL;
  
        h = helper_hash(tuple);
 -      hlist_for_each_entry_rcu(helper, n, &nf_ct_helper_hash[h], hnode) {
 +      hlist_for_each_entry_rcu(helper, &nf_ct_helper_hash[h], hnode) {
                if (nf_ct_tuple_src_mask_cmp(tuple, &helper->tuple, &mask))
                        return helper;
        }
@@@ -133,10 -134,11 +133,10 @@@ struct nf_conntrack_helper 
  __nf_conntrack_helper_find(const char *name, u16 l3num, u8 protonum)
  {
        struct nf_conntrack_helper *h;
 -      struct hlist_node *n;
        unsigned int i;
  
        for (i = 0; i < nf_ct_helper_hsize; i++) {
 -              hlist_for_each_entry_rcu(h, n, &nf_ct_helper_hash[i], hnode) {
 +              hlist_for_each_entry_rcu(h, &nf_ct_helper_hash[i], hnode) {
                        if (!strcmp(h->name, name) &&
                            h->tuple.src.l3num == l3num &&
                            h->tuple.dst.protonum == protonum)
@@@ -339,6 -341,13 +339,13 @@@ void nf_ct_helper_log(struct sk_buff *s
  {
        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);
        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);
  
@@@ -355,6 -366,7 +364,6 @@@ int nf_conntrack_helper_register(struc
  {
        int ret = 0;
        struct nf_conntrack_helper *cur;
 -      struct hlist_node *n;
        unsigned int h = helper_hash(&me->tuple);
  
        BUG_ON(me->expect_policy == NULL);
        BUG_ON(strlen(me->name) > NF_CT_HELPER_NAME_LEN - 1);
  
        mutex_lock(&nf_ct_helper_mutex);
 -      hlist_for_each_entry(cur, n, &nf_ct_helper_hash[h], hnode) {
 +      hlist_for_each_entry(cur, &nf_ct_helper_hash[h], hnode) {
                if (strncmp(cur->name, me->name, NF_CT_HELPER_NAME_LEN) == 0 &&
                    cur->tuple.src.l3num == me->tuple.src.l3num &&
                    cur->tuple.dst.protonum == me->tuple.dst.protonum) {
@@@ -383,13 -395,13 +392,13 @@@ static void __nf_conntrack_helper_unreg
  {
        struct nf_conntrack_tuple_hash *h;
        struct nf_conntrack_expect *exp;
 -      const struct hlist_node *n, *next;
 +      const struct hlist_node *next;
        const struct hlist_nulls_node *nn;
        unsigned int i;
  
        /* Get rid of expectations */
        for (i = 0; i < nf_ct_expect_hsize; i++) {
 -              hlist_for_each_entry_safe(exp, n, next,
 +              hlist_for_each_entry_safe(exp, next,
                                          &net->ct.expect_hash[i], hnode) {
                        struct nf_conn_help *help = nfct_help(exp->master);
                        if ((rcu_dereference_protected(
This page took 0.062271 seconds and 4 git commands to generate.