Skip to content

Commit

Permalink
net, compat_ioctl: fix SIOCGMII ioctls
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
arndb authored and davem330 committed Nov 9, 2009
1 parent f6b8f32 commit fab2532
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions net/socket.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit fab2532

Please sign in to comment.