aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv6
diff options
context:
space:
mode:
authorPavel Emelyanov <xemul@openvz.org>2008-01-09 03:33:11 -0500
committerDavid S. Miller <davem@davemloft.net>2008-01-28 18:01:10 -0500
commit3d7cc2ba628dcc6b55a2bafc7eaf35019fdcc201 (patch)
tree0b709ed4a97e048058d374401b50a3a1dbdce516 /net/ipv6
parentc6995bdff0fc9f97621922a7f857fa640537a7e2 (diff)
[NETFILTER]: Switch to using ctl_paths in nf_queue and conntrack modules
This includes the most simple cases for netfilter. The first part is tne queue modules for ipv4 and ipv6, on which the net/ipv4/ and net/ipv6/ paths are reused from the appropriate ipv4 and ipv6 code. The conntrack module is also patched, but this hunk is very small and simple. Signed-off-by: Pavel Emelyanov <xemul@openvz.org> Acked-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv6')
-rw-r--r--net/ipv6/netfilter/ip6_queue.c22
-rw-r--r--net/ipv6/sysctl_net_ipv6.c6
2 files changed, 5 insertions, 23 deletions
diff --git a/net/ipv6/netfilter/ip6_queue.c b/net/ipv6/netfilter/ip6_queue.c
index e5b0059582f5..a20db0bb5a1f 100644
--- a/net/ipv6/netfilter/ip6_queue.c
+++ b/net/ipv6/netfilter/ip6_queue.c
@@ -529,26 +529,6 @@ static ctl_table ipq_table[] = {
529 { .ctl_name = 0 } 529 { .ctl_name = 0 }
530}; 530};
531 531
532static ctl_table ipq_dir_table[] = {
533 {
534 .ctl_name = NET_IPV6,
535 .procname = "ipv6",
536 .mode = 0555,
537 .child = ipq_table
538 },
539 { .ctl_name = 0 }
540};
541
542static ctl_table ipq_root_table[] = {
543 {
544 .ctl_name = CTL_NET,
545 .procname = "net",
546 .mode = 0555,
547 .child = ipq_dir_table
548 },
549 { .ctl_name = 0 }
550};
551
552static int ip6_queue_show(struct seq_file *m, void *v) 532static int ip6_queue_show(struct seq_file *m, void *v)
553{ 533{
554 read_lock_bh(&queue_lock); 534 read_lock_bh(&queue_lock);
@@ -614,7 +594,7 @@ static int __init ip6_queue_init(void)
614 } 594 }
615 595
616 register_netdevice_notifier(&ipq_dev_notifier); 596 register_netdevice_notifier(&ipq_dev_notifier);
617 ipq_sysctl_header = register_sysctl_table(ipq_root_table); 597 ipq_sysctl_header = register_sysctl_paths(net_ipv6_ctl_path, ipq_table);
618 598
619 status = nf_register_queue_handler(PF_INET6, &nfqh); 599 status = nf_register_queue_handler(PF_INET6, &nfqh);
620 if (status < 0) { 600 if (status < 0) {
diff --git a/net/ipv6/sysctl_net_ipv6.c b/net/ipv6/sysctl_net_ipv6.c
index 0b5bec3cb797..4ad8d9d3cb7a 100644
--- a/net/ipv6/sysctl_net_ipv6.c
+++ b/net/ipv6/sysctl_net_ipv6.c
@@ -82,17 +82,19 @@ static ctl_table ipv6_table[] = {
82 { .ctl_name = 0 } 82 { .ctl_name = 0 }
83}; 83};
84 84
85static struct ctl_path ipv6_ctl_path[] = { 85struct ctl_path net_ipv6_ctl_path[] = {
86 { .procname = "net", .ctl_name = CTL_NET, }, 86 { .procname = "net", .ctl_name = CTL_NET, },
87 { .procname = "ipv6", .ctl_name = NET_IPV6, }, 87 { .procname = "ipv6", .ctl_name = NET_IPV6, },
88 { }, 88 { },
89}; 89};
90EXPORT_SYMBOL_GPL(net_ipv6_ctl_path);
90 91
91static struct ctl_table_header *ipv6_sysctl_header; 92static struct ctl_table_header *ipv6_sysctl_header;
92 93
93void ipv6_sysctl_register(void) 94void ipv6_sysctl_register(void)
94{ 95{
95 ipv6_sysctl_header = register_sysctl_paths(ipv6_ctl_path, ipv6_table); 96 ipv6_sysctl_header = register_sysctl_paths(net_ipv6_ctl_path,
97 ipv6_table);
96} 98}
97 99
98void ipv6_sysctl_unregister(void) 100void ipv6_sysctl_unregister(void)