]> bbs.cooldavid.org Git - net-next-2.6.git/blobdiff - net/netfilter/xt_recent.c
net: replace %p6 with %pI6
[net-next-2.6.git] / net / netfilter / xt_recent.c
index 4ebd4ca9a991bf871a23bf672ea2b30d5a9095d7..b785727a5bf7b9b7df2f102267c19f53b5bf6e74 100644 (file)
@@ -318,15 +318,15 @@ static bool recent_mt_check(const struct xt_mtchk_param *par)
        for (i = 0; i < ip_list_hash_size; i++)
                INIT_LIST_HEAD(&t->iphash[i]);
 #ifdef CONFIG_PROC_FS
-       t->proc = proc_create(t->name, ip_list_perms, recent_proc_dir,
-                 &recent_mt_fops);
+       t->proc = proc_create_data(t->name, ip_list_perms, recent_proc_dir,
+                 &recent_mt_fops, t);
        if (t->proc == NULL) {
                kfree(t);
                goto out;
        }
 #ifdef CONFIG_NETFILTER_XT_MATCH_RECENT_PROC_COMPAT
-       t->proc_old = proc_create(t->name, ip_list_perms, proc_old_dir,
-                     &recent_old_fops);
+       t->proc_old = proc_create_data(t->name, ip_list_perms, proc_old_dir,
+                     &recent_old_fops, t);
        if (t->proc_old == NULL) {
                remove_proc_entry(t->name, proc_old_dir);
                kfree(t);
@@ -334,11 +334,9 @@ static bool recent_mt_check(const struct xt_mtchk_param *par)
        }
        t->proc_old->uid   = ip_list_uid;
        t->proc_old->gid   = ip_list_gid;
-       t->proc_old->data  = t;
 #endif
        t->proc->uid       = ip_list_uid;
        t->proc->gid       = ip_list_gid;
-       t->proc->data      = t;
 #endif
        spin_lock_bh(&recent_lock);
        list_add_tail(&t->list, &tables);
@@ -428,9 +426,8 @@ static int recent_seq_show(struct seq_file *seq, void *v)
                           "oldest_pkt: %u", NIPQUAD(e->addr.ip), e->ttl,
                           e->stamps[i], e->index);
        else
-               seq_printf(seq, "src=" NIP6_FMT " ttl: %u last_seen: %lu "
-                          "oldest_pkt: %u", NIP6(e->addr.in6), e->ttl,
-                          e->stamps[i], e->index);
+               seq_printf(seq, "src=%pI6 ttl: %u last_seen: %lu oldest_pkt: %u",
+                          &e->addr.in6, e->ttl, e->stamps[i], e->index);
        for (i = 0; i < e->nstamps; i++)
                seq_printf(seq, "%s %lu", i ? "," : "", e->stamps[i]);
        seq_printf(seq, "\n");