aboutsummaryrefslogtreecommitdiffstats
path: root/net/socket.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/socket.c')
-rw-r--r--net/socket.c23
1 files changed, 23 insertions, 0 deletions
diff --git a/net/socket.c b/net/socket.c
index 224e7f73fdf0..befd9f5b1620 100644
--- a/net/socket.c
+++ b/net/socket.c
@@ -2627,6 +2627,27 @@ static int ethtool_ioctl(struct net *net, struct compat_ifreq __user *ifr32)
2627 return dev_ioctl(net, SIOCETHTOOL, ifr); 2627 return dev_ioctl(net, SIOCETHTOOL, ifr);
2628} 2628}
2629 2629
2630static int compat_siocwandev(struct net *net, struct compat_ifreq __user *uifr32)
2631{
2632 void __user *uptr;
2633 compat_uptr_t uptr32;
2634 struct ifreq __user *uifr;
2635
2636 uifr = compat_alloc_user_space(sizeof (*uifr));
2637 if (copy_in_user(uifr, uifr32, sizeof(struct compat_ifreq)))
2638 return -EFAULT;
2639
2640 if (get_user(uptr32, &uifr32->ifr_settings.ifs_ifsu))
2641 return -EFAULT;
2642
2643 uptr = compat_ptr(uptr32);
2644
2645 if (put_user(uptr, &uifr->ifr_settings.ifs_ifsu.raw_hdlc))
2646 return -EFAULT;
2647
2648 return dev_ioctl(net, SIOCWANDEV, uifr);
2649}
2650
2630static int bond_ioctl(struct net *net, unsigned int cmd, 2651static int bond_ioctl(struct net *net, unsigned int cmd,
2631 struct compat_ifreq __user *ifr32) 2652 struct compat_ifreq __user *ifr32)
2632{ 2653{
@@ -3058,6 +3079,8 @@ static int compat_sock_ioctl_trans(struct file *file, struct socket *sock,
3058 return dev_ifconf(net, argp); 3079 return dev_ifconf(net, argp);
3059 case SIOCETHTOOL: 3080 case SIOCETHTOOL:
3060 return ethtool_ioctl(net, argp); 3081 return ethtool_ioctl(net, argp);
3082 case SIOCWANDEV:
3083 return compat_siocwandev(net, argp);
3061 case SIOCBONDENSLAVE: 3084 case SIOCBONDENSLAVE:
3062 case SIOCBONDRELEASE: 3085 case SIOCBONDRELEASE:
3063 case SIOCBONDSETHWADDR: 3086 case SIOCBONDSETHWADDR: