aboutsummaryrefslogtreecommitdiffstats
path: root/net/netfilter
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2008-05-03 13:18:21 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2008-05-03 13:18:21 -0400
commit4f9faaace217b854ae1e1746ee4ac44688ddadbd (patch)
tree34122d9e84349a394988d6bfc480115e4809776a /net/netfilter
parentbf640be423d60d954b9673527e106a461a129eb8 (diff)
parentf37f2c62a28e848e06399ea2f9be1e098212625c (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: (47 commits) rose: Wrong list_lock argument in rose_node seqops netns: Fix reassembly timer to use the right namespace netns: Fix device renaming for sysfs bnx2: Update version to 1.7.5. bnx2: Update RV2P firmware for 5709. bnx2: Zero out context memory for 5709. bnx2: Fix register test on 5709. bnx2: Fix remote PHY initial link state. bnx2: Refine remote PHY locking. bridge: forwarding table information for >256 devices tg3: Update version to 3.92 tg3: Add link state reporting to UMP firmware tg3: Fix ethtool loopback test for 5761 BX devices tg3: Fix 5761 NVRAM sizes tg3: Use constant 500KHz MI clock on adapters with a CPMU hci_usb.h: fix hard-to-trigger race dccp: ccid2.c, ccid3.c use clamp(), clamp_t() net: remove NR_CPUS arrays in net/core/dev.c net: use get/put_unaligned_* helpers bluetooth: use get/put_unaligned_* helpers ...
Diffstat (limited to 'net/netfilter')
-rw-r--r--net/netfilter/nf_conntrack_standalone.c6
-rw-r--r--net/netfilter/x_tables.c13
-rw-r--r--net/netfilter/xt_hashlimit.c12
3 files changed, 15 insertions, 16 deletions
diff --git a/net/netfilter/nf_conntrack_standalone.c b/net/netfilter/nf_conntrack_standalone.c
index b59871f6bdda..46ea542d0df9 100644
--- a/net/netfilter/nf_conntrack_standalone.c
+++ b/net/netfilter/nf_conntrack_standalone.c
@@ -296,11 +296,11 @@ static int nf_conntrack_standalone_init_proc(void)
296 pde = proc_net_fops_create(&init_net, "nf_conntrack", 0440, &ct_file_ops); 296 pde = proc_net_fops_create(&init_net, "nf_conntrack", 0440, &ct_file_ops);
297 if (!pde) 297 if (!pde)
298 goto out_nf_conntrack; 298 goto out_nf_conntrack;
299 pde = create_proc_entry("nf_conntrack", S_IRUGO, init_net.proc_net_stat); 299
300 pde = proc_create("nf_conntrack", S_IRUGO, init_net.proc_net_stat,
301 &ct_cpu_seq_fops);
300 if (!pde) 302 if (!pde)
301 goto out_stat_nf_conntrack; 303 goto out_stat_nf_conntrack;
302 pde->proc_fops = &ct_cpu_seq_fops;
303 pde->owner = THIS_MODULE;
304 return 0; 304 return 0;
305 305
306out_stat_nf_conntrack: 306out_stat_nf_conntrack:
diff --git a/net/netfilter/x_tables.c b/net/netfilter/x_tables.c
index 11b22abc2b70..5d75cd86ebb3 100644
--- a/net/netfilter/x_tables.c
+++ b/net/netfilter/x_tables.c
@@ -936,25 +936,24 @@ int xt_proto_init(struct net *net, int af)
936#ifdef CONFIG_PROC_FS 936#ifdef CONFIG_PROC_FS
937 strlcpy(buf, xt_prefix[af], sizeof(buf)); 937 strlcpy(buf, xt_prefix[af], sizeof(buf));
938 strlcat(buf, FORMAT_TABLES, sizeof(buf)); 938 strlcat(buf, FORMAT_TABLES, sizeof(buf));
939 proc = proc_net_fops_create(net, buf, 0440, &xt_table_ops); 939 proc = proc_create_data(buf, 0440, net->proc_net, &xt_table_ops,
940 (void *)(unsigned long)af);
940 if (!proc) 941 if (!proc)
941 goto out; 942 goto out;
942 proc->data = (void *)(unsigned long)af;
943
944 943
945 strlcpy(buf, xt_prefix[af], sizeof(buf)); 944 strlcpy(buf, xt_prefix[af], sizeof(buf));
946 strlcat(buf, FORMAT_MATCHES, sizeof(buf)); 945 strlcat(buf, FORMAT_MATCHES, sizeof(buf));
947 proc = proc_net_fops_create(net, buf, 0440, &xt_match_ops); 946 proc = proc_create_data(buf, 0440, net->proc_net, &xt_match_ops,
947 (void *)(unsigned long)af);
948 if (!proc) 948 if (!proc)
949 goto out_remove_tables; 949 goto out_remove_tables;
950 proc->data = (void *)(unsigned long)af;
951 950
952 strlcpy(buf, xt_prefix[af], sizeof(buf)); 951 strlcpy(buf, xt_prefix[af], sizeof(buf));
953 strlcat(buf, FORMAT_TARGETS, sizeof(buf)); 952 strlcat(buf, FORMAT_TARGETS, sizeof(buf));
954 proc = proc_net_fops_create(net, buf, 0440, &xt_target_ops); 953 proc = proc_create_data(buf, 0440, net->proc_net, &xt_target_ops,
954 (void *)(unsigned long)af);
955 if (!proc) 955 if (!proc)
956 goto out_remove_matches; 956 goto out_remove_matches;
957 proc->data = (void *)(unsigned long)af;
958#endif 957#endif
959 958
960 return 0; 959 return 0;
diff --git a/net/netfilter/xt_hashlimit.c b/net/netfilter/xt_hashlimit.c
index 40d344b21453..6809af542a2c 100644
--- a/net/netfilter/xt_hashlimit.c
+++ b/net/netfilter/xt_hashlimit.c
@@ -237,15 +237,15 @@ static int htable_create_v0(struct xt_hashlimit_info *minfo, int family)
237 hinfo->family = family; 237 hinfo->family = family;
238 hinfo->rnd_initialized = 0; 238 hinfo->rnd_initialized = 0;
239 spin_lock_init(&hinfo->lock); 239 spin_lock_init(&hinfo->lock);
240 hinfo->pde = proc_create(minfo->name, 0, 240 hinfo->pde =
241 proc_create_data(minfo->name, 0,
241 family == AF_INET ? hashlimit_procdir4 : 242 family == AF_INET ? hashlimit_procdir4 :
242 hashlimit_procdir6, 243 hashlimit_procdir6,
243 &dl_file_ops); 244 &dl_file_ops, hinfo);
244 if (!hinfo->pde) { 245 if (!hinfo->pde) {
245 vfree(hinfo); 246 vfree(hinfo);
246 return -1; 247 return -1;
247 } 248 }
248 hinfo->pde->data = hinfo;
249 249
250 setup_timer(&hinfo->timer, htable_gc, (unsigned long )hinfo); 250 setup_timer(&hinfo->timer, htable_gc, (unsigned long )hinfo);
251 hinfo->timer.expires = jiffies + msecs_to_jiffies(hinfo->cfg.gc_interval); 251 hinfo->timer.expires = jiffies + msecs_to_jiffies(hinfo->cfg.gc_interval);
@@ -301,15 +301,15 @@ static int htable_create(struct xt_hashlimit_mtinfo1 *minfo,
301 hinfo->rnd_initialized = 0; 301 hinfo->rnd_initialized = 0;
302 spin_lock_init(&hinfo->lock); 302 spin_lock_init(&hinfo->lock);
303 303
304 hinfo->pde = proc_create(minfo->name, 0, 304 hinfo->pde =
305 proc_create_data(minfo->name, 0,
305 family == AF_INET ? hashlimit_procdir4 : 306 family == AF_INET ? hashlimit_procdir4 :
306 hashlimit_procdir6, 307 hashlimit_procdir6,
307 &dl_file_ops); 308 &dl_file_ops, hinfo);
308 if (hinfo->pde == NULL) { 309 if (hinfo->pde == NULL) {
309 vfree(hinfo); 310 vfree(hinfo);
310 return -1; 311 return -1;
311 } 312 }
312 hinfo->pde->data = hinfo;
313 313
314 setup_timer(&hinfo->timer, htable_gc, (unsigned long)hinfo); 314 setup_timer(&hinfo->timer, htable_gc, (unsigned long)hinfo);
315 hinfo->timer.expires = jiffies + msecs_to_jiffies(hinfo->cfg.gc_interval); 315 hinfo->timer.expires = jiffies + msecs_to_jiffies(hinfo->cfg.gc_interval);