summaryrefslogtreecommitdiffstats
path: root/net/socket.c
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2009-11-08 20:56:21 -0800
committerDavid S. Miller <davem@davemloft.net>2009-11-08 20:56:21 -0800
commitfab2532ba50b287647d95046c4f3b37bf6379d37 (patch)
tree2fe0adee55965f6e2f6f0a4147add521e89cb098 /net/socket.c
parentf6b8f32ca71406de718391369490f6b1e81fe0bb (diff)
downloadlinux-fab2532ba50b287647d95046c4f3b37bf6379d37.tar.gz
linux-fab2532ba50b287647d95046c4f3b37bf6379d37.tar.bz2
linux-fab2532ba50b287647d95046c4f3b37bf6379d37.zip
net, compat_ioctl: fix SIOCGMII ioctls
SIOCGMIIPHY and SIOCGMIIREG return data through ifreq, so it needs to be converted on the way out as well. SIOCGIFPFLAGS is unused, but has the same problem in theory. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/socket.c')
-rw-r--r--net/socket.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/net/socket.c b/net/socket.c
index bfbde200b743..224e7f73fdf0 100644
--- a/net/socket.c
+++ b/net/socket.c
@@ -2746,7 +2746,10 @@ static int dev_ifsioc(struct net *net, struct socket *sock,
case SIOCGIFBRDADDR:
case SIOCGIFDSTADDR:
case SIOCGIFNETMASK:
+ case SIOCGIFPFLAGS:
case SIOCGIFTXQLEN:
+ case SIOCGMIIPHY:
+ case SIOCGMIIREG:
if (copy_to_user(uifr32, &ifr, sizeof(*uifr32)))
return -EFAULT;
break;