diff options
| author | David S. Miller <davem@davemloft.net> | 2008-03-27 21:48:56 -0400 |
|---|---|---|
| committer | David S. Miller <davem@davemloft.net> | 2008-03-27 21:48:56 -0400 |
| commit | 8e8e43843ba3ced0c657cbc0fdb10644ec60f772 (patch) | |
| tree | e64954326ced9c365c52c256f01b5f9fb1bcae66 /net/netfilter | |
| parent | ed85f2c3b2b72bd20f617ac749f5c22be8d0f66e (diff) | |
| parent | 50fd4407b8bfbde7c1a0bfe4f24de7df37164342 (diff) | |
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6
Conflicts:
drivers/net/usb/rndis_host.c
drivers/net/wireless/b43/dma.c
net/ipv6/ndisc.c
Diffstat (limited to 'net/netfilter')
| -rw-r--r-- | net/netfilter/nf_conntrack_standalone.c | 9 | ||||
| -rw-r--r-- | net/netfilter/nf_log.c | 8 | ||||
| -rw-r--r-- | net/netfilter/nf_queue.c | 7 | ||||
| -rw-r--r-- | net/netfilter/nfnetlink_log.c | 9 | ||||
| -rw-r--r-- | net/netfilter/nfnetlink_queue.c | 9 | ||||
| -rw-r--r-- | net/netfilter/xt_hashlimit.c | 16 |
6 files changed, 19 insertions, 39 deletions
diff --git a/net/netfilter/nf_conntrack_standalone.c b/net/netfilter/nf_conntrack_standalone.c index a9bf6e4fd0cc..9d0b8bb4113c 100644 --- a/net/netfilter/nf_conntrack_standalone.c +++ b/net/netfilter/nf_conntrack_standalone.c | |||
| @@ -395,7 +395,7 @@ EXPORT_SYMBOL_GPL(nf_ct_log_invalid); | |||
| 395 | static int __init nf_conntrack_standalone_init(void) | 395 | static int __init nf_conntrack_standalone_init(void) |
| 396 | { | 396 | { |
| 397 | #ifdef CONFIG_PROC_FS | 397 | #ifdef CONFIG_PROC_FS |
| 398 | struct proc_dir_entry *proc, *proc_stat; | 398 | struct proc_dir_entry *proc; |
| 399 | #endif | 399 | #endif |
| 400 | int ret = 0; | 400 | int ret = 0; |
| 401 | 401 | ||
| @@ -407,12 +407,9 @@ static int __init nf_conntrack_standalone_init(void) | |||
| 407 | proc = proc_net_fops_create(&init_net, "nf_conntrack", 0440, &ct_file_ops); | 407 | proc = proc_net_fops_create(&init_net, "nf_conntrack", 0440, &ct_file_ops); |
| 408 | if (!proc) goto cleanup_init; | 408 | if (!proc) goto cleanup_init; |
| 409 | 409 | ||
| 410 | proc_stat = create_proc_entry("nf_conntrack", S_IRUGO, init_net.proc_net_stat); | 410 | if (!proc_create("nf_conntrack", S_IRUGO, |
| 411 | if (!proc_stat) | 411 | init_net.proc_net_stat, &ct_cpu_seq_fops)) |
| 412 | goto cleanup_proc; | 412 | goto cleanup_proc; |
| 413 | |||
| 414 | proc_stat->proc_fops = &ct_cpu_seq_fops; | ||
| 415 | proc_stat->owner = THIS_MODULE; | ||
| 416 | #endif | 413 | #endif |
| 417 | #ifdef CONFIG_SYSCTL | 414 | #ifdef CONFIG_SYSCTL |
| 418 | nf_ct_sysctl_header = register_sysctl_paths(nf_ct_path, | 415 | nf_ct_sysctl_header = register_sysctl_paths(nf_ct_path, |
diff --git a/net/netfilter/nf_log.c b/net/netfilter/nf_log.c index cec9976aecbf..bc11d7092032 100644 --- a/net/netfilter/nf_log.c +++ b/net/netfilter/nf_log.c | |||
| @@ -168,13 +168,9 @@ static const struct file_operations nflog_file_ops = { | |||
| 168 | int __init netfilter_log_init(void) | 168 | int __init netfilter_log_init(void) |
| 169 | { | 169 | { |
| 170 | #ifdef CONFIG_PROC_FS | 170 | #ifdef CONFIG_PROC_FS |
| 171 | struct proc_dir_entry *pde; | 171 | if (!proc_create("nf_log", S_IRUGO, |
| 172 | 172 | proc_net_netfilter, &nflog_file_ops)) | |
| 173 | pde = create_proc_entry("nf_log", S_IRUGO, proc_net_netfilter); | ||
| 174 | if (!pde) | ||
| 175 | return -1; | 173 | return -1; |
| 176 | |||
| 177 | pde->proc_fops = &nflog_file_ops; | ||
| 178 | #endif | 174 | #endif |
| 179 | return 0; | 175 | return 0; |
| 180 | } | 176 | } |
diff --git a/net/netfilter/nf_queue.c b/net/netfilter/nf_queue.c index ddc80ea114cd..bbd26893c0c4 100644 --- a/net/netfilter/nf_queue.c +++ b/net/netfilter/nf_queue.c | |||
| @@ -348,12 +348,9 @@ static const struct file_operations nfqueue_file_ops = { | |||
| 348 | int __init netfilter_queue_init(void) | 348 | int __init netfilter_queue_init(void) |
| 349 | { | 349 | { |
| 350 | #ifdef CONFIG_PROC_FS | 350 | #ifdef CONFIG_PROC_FS |
| 351 | struct proc_dir_entry *pde; | 351 | if (!proc_create("nf_queue", S_IRUGO, |
| 352 | 352 | proc_net_netfilter, &nfqueue_file_ops)) | |
| 353 | pde = create_proc_entry("nf_queue", S_IRUGO, proc_net_netfilter); | ||
| 354 | if (!pde) | ||
| 355 | return -1; | 353 | return -1; |
| 356 | pde->proc_fops = &nfqueue_file_ops; | ||
| 357 | #endif | 354 | #endif |
| 358 | return 0; | 355 | return 0; |
| 359 | } | 356 | } |
diff --git a/net/netfilter/nfnetlink_log.c b/net/netfilter/nfnetlink_log.c index bf3f19b21fe4..b8173af8c24a 100644 --- a/net/netfilter/nfnetlink_log.c +++ b/net/netfilter/nfnetlink_log.c | |||
| @@ -923,9 +923,6 @@ static const struct file_operations nful_file_ops = { | |||
| 923 | static int __init nfnetlink_log_init(void) | 923 | static int __init nfnetlink_log_init(void) |
| 924 | { | 924 | { |
| 925 | int i, status = -ENOMEM; | 925 | int i, status = -ENOMEM; |
| 926 | #ifdef CONFIG_PROC_FS | ||
| 927 | struct proc_dir_entry *proc_nful; | ||
| 928 | #endif | ||
| 929 | 926 | ||
| 930 | for (i = 0; i < INSTANCE_BUCKETS; i++) | 927 | for (i = 0; i < INSTANCE_BUCKETS; i++) |
| 931 | INIT_HLIST_HEAD(&instance_table[i]); | 928 | INIT_HLIST_HEAD(&instance_table[i]); |
| @@ -943,11 +940,9 @@ static int __init nfnetlink_log_init(void) | |||
| 943 | } | 940 | } |
| 944 | 941 | ||
| 945 | #ifdef CONFIG_PROC_FS | 942 | #ifdef CONFIG_PROC_FS |
| 946 | proc_nful = create_proc_entry("nfnetlink_log", 0440, | 943 | if (!proc_create("nfnetlink_log", 0440, |
| 947 | proc_net_netfilter); | 944 | proc_net_netfilter, &nful_file_ops)) |
| 948 | if (!proc_nful) | ||
| 949 | goto cleanup_subsys; | 945 | goto cleanup_subsys; |
| 950 | proc_nful->proc_fops = &nful_file_ops; | ||
| 951 | #endif | 946 | #endif |
| 952 | return status; | 947 | return status; |
| 953 | 948 | ||
diff --git a/net/netfilter/nfnetlink_queue.c b/net/netfilter/nfnetlink_queue.c index 81fb048add88..2c9fe5c12894 100644 --- a/net/netfilter/nfnetlink_queue.c +++ b/net/netfilter/nfnetlink_queue.c | |||
| @@ -896,9 +896,6 @@ static const struct file_operations nfqnl_file_ops = { | |||
| 896 | static int __init nfnetlink_queue_init(void) | 896 | static int __init nfnetlink_queue_init(void) |
| 897 | { | 897 | { |
| 898 | int i, status = -ENOMEM; | 898 | int i, status = -ENOMEM; |
| 899 | #ifdef CONFIG_PROC_FS | ||
| 900 | struct proc_dir_entry *proc_nfqueue; | ||
| 901 | #endif | ||
| 902 | 899 | ||
| 903 | for (i = 0; i < INSTANCE_BUCKETS; i++) | 900 | for (i = 0; i < INSTANCE_BUCKETS; i++) |
| 904 | INIT_HLIST_HEAD(&instance_table[i]); | 901 | INIT_HLIST_HEAD(&instance_table[i]); |
| @@ -911,11 +908,9 @@ static int __init nfnetlink_queue_init(void) | |||
| 911 | } | 908 | } |
| 912 | 909 | ||
| 913 | #ifdef CONFIG_PROC_FS | 910 | #ifdef CONFIG_PROC_FS |
| 914 | proc_nfqueue = create_proc_entry("nfnetlink_queue", 0440, | 911 | if (!proc_create("nfnetlink_queue", 0440, |
| 915 | proc_net_netfilter); | 912 | proc_net_netfilter, &nfqnl_file_ops)) |
| 916 | if (!proc_nfqueue) | ||
| 917 | goto cleanup_subsys; | 913 | goto cleanup_subsys; |
| 918 | proc_nfqueue->proc_fops = &nfqnl_file_ops; | ||
| 919 | #endif | 914 | #endif |
| 920 | 915 | ||
| 921 | register_netdevice_notifier(&nfqnl_dev_notifier); | 916 | register_netdevice_notifier(&nfqnl_dev_notifier); |
diff --git a/net/netfilter/xt_hashlimit.c b/net/netfilter/xt_hashlimit.c index 5418ce59ac3a..dc29007c52cd 100644 --- a/net/netfilter/xt_hashlimit.c +++ b/net/netfilter/xt_hashlimit.c | |||
| @@ -237,14 +237,14 @@ 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 = create_proc_entry(minfo->name, 0, | 240 | hinfo->pde = proc_create(minfo->name, 0, |
| 241 | family == AF_INET ? hashlimit_procdir4 : | 241 | family == AF_INET ? hashlimit_procdir4 : |
| 242 | hashlimit_procdir6); | 242 | hashlimit_procdir6, |
| 243 | &dl_file_ops); | ||
| 243 | if (!hinfo->pde) { | 244 | if (!hinfo->pde) { |
| 244 | vfree(hinfo); | 245 | vfree(hinfo); |
| 245 | return -1; | 246 | return -1; |
| 246 | } | 247 | } |
| 247 | hinfo->pde->proc_fops = &dl_file_ops; | ||
| 248 | hinfo->pde->data = hinfo; | 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); |
| @@ -301,14 +301,14 @@ 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 = create_proc_entry(minfo->name, 0, | 304 | hinfo->pde = proc_create(minfo->name, 0, |
| 305 | family == AF_INET ? hashlimit_procdir4 : | 305 | family == AF_INET ? hashlimit_procdir4 : |
| 306 | hashlimit_procdir6); | 306 | hashlimit_procdir6, |
| 307 | &dl_file_ops); | ||
| 307 | if (hinfo->pde == NULL) { | 308 | if (hinfo->pde == NULL) { |
| 308 | vfree(hinfo); | 309 | vfree(hinfo); |
| 309 | return -1; | 310 | return -1; |
| 310 | } | 311 | } |
| 311 | hinfo->pde->proc_fops = &dl_file_ops; | ||
| 312 | hinfo->pde->data = hinfo; | 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); |
