git://ftp.safe.ca
/
safe
/
jmp
/
linux-2.6
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/torvalds/linux-2.6
[safe/jmp/linux-2.6]
/
net
/
bridge
/
br_ioctl.c
diff --git
a/net/bridge/br_ioctl.c
b/net/bridge/br_ioctl.c
index
5bbf073
..
6a6433d
100644
(file)
--- a/
net/bridge/br_ioctl.c
+++ b/
net/bridge/br_ioctl.c
@@
-21,12
+21,12
@@
#include "br_private.h"
/* called with RTNL */
#include "br_private.h"
/* called with RTNL */
-static int get_bridge_ifindices(int *indices, int num)
+static int get_bridge_ifindices(
struct net *net,
int *indices, int num)
{
struct net_device *dev;
int i = 0;
{
struct net_device *dev;
int i = 0;
- for_each_netdev(
&init_
net, dev) {
+ for_each_netdev(net, dev) {
if (i >= num)
break;
if (dev->priv_flags & IFF_EBRIDGE)
if (i >= num)
break;
if (dev->priv_flags & IFF_EBRIDGE)
@@
-89,7
+89,7
@@
static int add_del_if(struct net_bridge *br, int ifindex, int isadd)
if (!capable(CAP_NET_ADMIN))
return -EPERM;
if (!capable(CAP_NET_ADMIN))
return -EPERM;
- dev = dev_get_by_index(
&init_net
, ifindex);
+ dev = dev_get_by_index(
dev_net(br->dev)
, ifindex);
if (dev == NULL)
return -EINVAL;
if (dev == NULL)
return -EINVAL;
@@
-315,7
+315,7
@@
static int old_dev_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
return -EOPNOTSUPP;
}
return -EOPNOTSUPP;
}
-static int old_deviceless(void __user *uarg)
+static int old_deviceless(
struct net *net,
void __user *uarg)
{
unsigned long args[3];
{
unsigned long args[3];
@@
-337,7
+337,7
@@
static int old_deviceless(void __user *uarg)
if (indices == NULL)
return -ENOMEM;
if (indices == NULL)
return -ENOMEM;
- args[2] = get_bridge_ifindices(indices, args[2]);
+ args[2] = get_bridge_ifindices(
net,
indices, args[2]);
ret = copy_to_user((void __user *)args[1], indices, args[2]*sizeof(int))
? -EFAULT : args[2];
ret = copy_to_user((void __user *)args[1], indices, args[2]*sizeof(int))
? -EFAULT : args[2];
@@
-360,9
+360,9
@@
static int old_deviceless(void __user *uarg)
buf[IFNAMSIZ-1] = 0;
if (args[0] == BRCTL_ADD_BRIDGE)
buf[IFNAMSIZ-1] = 0;
if (args[0] == BRCTL_ADD_BRIDGE)
- return br_add_bridge(buf);
+ return br_add_bridge(
net,
buf);
- return br_del_bridge(buf);
+ return br_del_bridge(
net,
buf);
}
}
}
}
@@
-374,7
+374,7
@@
int br_ioctl_deviceless_stub(struct net *net, unsigned int cmd, void __user *uar
switch (cmd) {
case SIOCGIFBR:
case SIOCSIFBR:
switch (cmd) {
case SIOCGIFBR:
case SIOCSIFBR:
- return old_deviceless(uarg);
+ return old_deviceless(
net,
uarg);
case SIOCBRADDBR:
case SIOCBRDELBR:
case SIOCBRADDBR:
case SIOCBRDELBR:
@@
-389,9
+389,9
@@
int br_ioctl_deviceless_stub(struct net *net, unsigned int cmd, void __user *uar
buf[IFNAMSIZ-1] = 0;
if (cmd == SIOCBRADDBR)
buf[IFNAMSIZ-1] = 0;
if (cmd == SIOCBRADDBR)
- return br_add_bridge(buf);
+ return br_add_bridge(
net,
buf);
- return br_del_bridge(buf);
+ return br_del_bridge(
net,
buf);
}
}
return -EOPNOTSUPP;
}
}
return -EOPNOTSUPP;