aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4/devinet.c
diff options
context:
space:
mode:
authorDenis V. Lunev <den@openvz.org>2008-02-28 23:51:43 -0500
committerDavid S. Miller <davem@davemloft.net>2008-02-28 23:51:43 -0500
commite5b13cb10de209f924fdf9478214bcf7e4008d6d (patch)
tree212d723fe14e2dd49ab044f8ca969303f316645c /net/ipv4/devinet.c
parent73b3871165e45ea6d57775c6bfb1a1760ad6e36b (diff)
[NETNS]: Process devinet ioctl in the correct namespace.
Add namespace parameter to devinet_ioctl and locate device inside it for state changes. Signed-off-by: Denis V. Lunev <den@openvz.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/devinet.c')
-rw-r--r--net/ipv4/devinet.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/net/ipv4/devinet.c b/net/ipv4/devinet.c
index 90210a74d638..af752fc5d0ab 100644
--- a/net/ipv4/devinet.c
+++ b/net/ipv4/devinet.c
@@ -595,7 +595,7 @@ static __inline__ int inet_abc_len(__be32 addr)
595} 595}
596 596
597 597
598int devinet_ioctl(unsigned int cmd, void __user *arg) 598int devinet_ioctl(struct net *net, unsigned int cmd, void __user *arg)
599{ 599{
600 struct ifreq ifr; 600 struct ifreq ifr;
601 struct sockaddr_in sin_orig; 601 struct sockaddr_in sin_orig;
@@ -624,7 +624,7 @@ int devinet_ioctl(unsigned int cmd, void __user *arg)
624 *colon = 0; 624 *colon = 0;
625 625
626#ifdef CONFIG_KMOD 626#ifdef CONFIG_KMOD
627 dev_load(&init_net, ifr.ifr_name); 627 dev_load(net, ifr.ifr_name);
628#endif 628#endif
629 629
630 switch (cmd) { 630 switch (cmd) {
@@ -665,7 +665,7 @@ int devinet_ioctl(unsigned int cmd, void __user *arg)
665 rtnl_lock(); 665 rtnl_lock();
666 666
667 ret = -ENODEV; 667 ret = -ENODEV;
668 if ((dev = __dev_get_by_name(&init_net, ifr.ifr_name)) == NULL) 668 if ((dev = __dev_get_by_name(net, ifr.ifr_name)) == NULL)
669 goto done; 669 goto done;
670 670
671 if (colon) 671 if (colon)