]> bbs.cooldavid.org Git - net-next-2.6.git/blobdiff - net/ipv4/udp.c
[NET]: Make /proc/net per network namespace
[net-next-2.6.git] / net / ipv4 / udp.c
index a581b543bff7f23fb53304f4439d07166d01c4e9..ef4d901ee9ad62f8e6a0118d6cb394db125175ad 100644 (file)
@@ -98,6 +98,7 @@
 #include <linux/skbuff.h>
 #include <linux/proc_fs.h>
 #include <linux/seq_file.h>
+#include <net/net_namespace.h>
 #include <net/icmp.h>
 #include <net/route.h>
 #include <net/checksum.h>
@@ -1566,7 +1567,7 @@ int udp_proc_register(struct udp_seq_afinfo *afinfo)
        afinfo->seq_fops->llseek        = seq_lseek;
        afinfo->seq_fops->release       = seq_release_private;
 
-       p = proc_net_fops_create(afinfo->name, S_IRUGO, afinfo->seq_fops);
+       p = proc_net_fops_create(&init_net, afinfo->name, S_IRUGO, afinfo->seq_fops);
        if (p)
                p->data = afinfo;
        else
@@ -1578,7 +1579,7 @@ void udp_proc_unregister(struct udp_seq_afinfo *afinfo)
 {
        if (!afinfo)
                return;
-       proc_net_remove(afinfo->name);
+       proc_net_remove(&init_net, afinfo->name);
        memset(afinfo->seq_fops, 0, sizeof(*afinfo->seq_fops));
 }