]> bbs.cooldavid.org Git - net-next-2.6.git/blobdiff - net/bridge/br_ioctl.c
[NET]: Make the device list and device lookups per namespace.
[net-next-2.6.git] / net / bridge / br_ioctl.c
index bb15e9e259b12e0bae720bf3fa7ff93ad2eb6afc..0655a5f07f58aeef86a3ef934949cffbda360e6e 100644 (file)
@@ -18,6 +18,7 @@
 #include <linux/if_bridge.h>
 #include <linux/netdevice.h>
 #include <linux/times.h>
+#include <net/net_namespace.h>
 #include <asm/uaccess.h>
 #include "br_private.h"
 
@@ -27,7 +28,7 @@ static int get_bridge_ifindices(int *indices, int num)
        struct net_device *dev;
        int i = 0;
 
-       for_each_netdev(dev) {
+       for_each_netdev(&init_net, dev) {
                if (i >= num)
                        break;
                if (dev->priv_flags & IFF_EBRIDGE)
@@ -90,7 +91,7 @@ static int add_del_if(struct net_bridge *br, int ifindex, int isadd)
        if (!capable(CAP_NET_ADMIN))
                return -EPERM;
 
-       dev = dev_get_by_index(ifindex);
+       dev = dev_get_by_index(&init_net, ifindex);
        if (dev == NULL)
                return -EINVAL;
 
@@ -364,7 +365,7 @@ static int old_deviceless(void __user *uarg)
        return -EOPNOTSUPP;
 }
 
-int br_ioctl_deviceless_stub(unsigned int cmd, void __user *uarg)
+int br_ioctl_deviceless_stub(struct net *net, unsigned int cmd, void __user *uarg)
 {
        switch (cmd) {
        case SIOCGIFBR: