[NET]: Make /proc/net per network namespace
[safe/jmp/linux-2.6] / net / ipv4 / route.c
index c7ca94b..efd2a92 100644 (file)
@@ -91,6 +91,7 @@
 #include <linux/jhash.h>
 #include <linux/rcupdate.h>
 #include <linux/times.h>
+#include <net/net_namespace.h>
 #include <net/protocol.h>
 #include <net/ip.h>
 #include <net/route.h>
@@ -3011,15 +3012,15 @@ int __init ip_rt_init(void)
 #ifdef CONFIG_PROC_FS
        {
        struct proc_dir_entry *rtstat_pde = NULL; /* keep gcc happy */
-       if (!proc_net_fops_create("rt_cache", S_IRUGO, &rt_cache_seq_fops) ||
+       if (!proc_net_fops_create(&init_net, "rt_cache", S_IRUGO, &rt_cache_seq_fops) ||
            !(rtstat_pde = create_proc_entry("rt_cache", S_IRUGO,
-                                            proc_net_stat))) {
+                                            init_net.proc_net_stat))) {
                return -ENOMEM;
        }
        rtstat_pde->proc_fops = &rt_cpu_seq_fops;
        }
 #ifdef CONFIG_NET_CLS_ROUTE
-       create_proc_read_entry("rt_acct", 0, proc_net, ip_rt_acct_read, NULL);
+       create_proc_read_entry("rt_acct", 0, init_net.proc_net, ip_rt_acct_read, NULL);
 #endif
 #endif
 #ifdef CONFIG_XFRM