aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--net/socket.c31
1 files changed, 17 insertions, 14 deletions
diff --git a/net/socket.c b/net/socket.c
index 901d709a7be0..bfbde200b743 100644
--- a/net/socket.c
+++ b/net/socket.c
@@ -3069,11 +3069,6 @@ static int compat_sock_ioctl_trans(struct file *file, struct socket *sock,
3069 return do_siocgstamp(net, sock, cmd, argp); 3069 return do_siocgstamp(net, sock, cmd, argp);
3070 case SIOCGSTAMPNS: 3070 case SIOCGSTAMPNS:
3071 return do_siocgstampns(net, sock, cmd, argp); 3071 return do_siocgstampns(net, sock, cmd, argp);
3072/* Note SIOCRTMSG is no longer, so this is safe and
3073 * the user would have seen just an -EINVAL anyways. */
3074 case SIOCRTMSG:
3075 case SIOCGIFCOUNT:
3076 return -EINVAL;
3077 3072
3078 case FIOSETOWN: 3073 case FIOSETOWN:
3079 case SIOCSPGRP: 3074 case SIOCSPGRP:
@@ -3107,8 +3102,6 @@ static int compat_sock_ioctl_trans(struct file *file, struct socket *sock,
3107 case SIOCSIFHWBROADCAST: 3102 case SIOCSIFHWBROADCAST:
3108 case SIOCSHWTSTAMP: 3103 case SIOCSHWTSTAMP:
3109 case SIOCDIFADDR: 3104 case SIOCDIFADDR:
3110/* case SIOCSARP: duplicate */
3111/* case SIOCDARP: duplicate */
3112 case SIOCGIFBRDADDR: 3105 case SIOCGIFBRDADDR:
3113 case SIOCSIFBRDADDR: 3106 case SIOCSIFBRDADDR:
3114 case SIOCGIFDSTADDR: 3107 case SIOCGIFDSTADDR:
@@ -3121,7 +3114,12 @@ static int compat_sock_ioctl_trans(struct file *file, struct socket *sock,
3121 case SIOCSIFTXQLEN: 3114 case SIOCSIFTXQLEN:
3122 case SIOCBRADDIF: 3115 case SIOCBRADDIF:
3123 case SIOCBRDELIF: 3116 case SIOCBRDELIF:
3117 case SIOCSIFNAME:
3118 case SIOCGMIIPHY:
3119 case SIOCGMIIREG:
3120 case SIOCSMIIREG:
3124 return dev_ifsioc(net, sock, cmd, argp); 3121 return dev_ifsioc(net, sock, cmd, argp);
3122
3125 case ATM_GETLINKRATE32: 3123 case ATM_GETLINKRATE32:
3126 case ATM_GETNAMES32: 3124 case ATM_GETNAMES32:
3127 case ATM_GETTYPE32: 3125 case ATM_GETTYPE32:
@@ -3168,17 +3166,22 @@ static int compat_sock_ioctl_trans(struct file *file, struct socket *sock,
3168 case SIOCSARP: 3166 case SIOCSARP:
3169 case SIOCGARP: 3167 case SIOCGARP:
3170 case SIOCDARP: 3168 case SIOCDARP:
3171
3172 case SIOCATMARK: 3169 case SIOCATMARK:
3173 case SIOCSIFLINK: 3170 return sock_do_ioctl(net, sock, cmd, arg);
3174 case SIOCSIFNAME: 3171 }
3172
3173 /* Prevent warning from compat_sys_ioctl, these always
3174 * result in -EINVAL in the native case anyway. */
3175 switch (cmd) {
3176 case SIOCRTMSG:
3177 case SIOCGIFCOUNT:
3175 case SIOCSRARP: 3178 case SIOCSRARP:
3176 case SIOCGRARP: 3179 case SIOCGRARP:
3177 case SIOCDRARP: 3180 case SIOCDRARP:
3178 case SIOCGMIIPHY: 3181 case SIOCSIFLINK:
3179 case SIOCGMIIREG: 3182 case SIOCGIFSLAVE:
3180 case SIOCSMIIREG: 3183 case SIOCSIFSLAVE:
3181 return sock_do_ioctl(net, sock, cmd, arg); 3184 return -EINVAL;
3182 } 3185 }
3183 3186
3184 return -ENOIOCTLCMD; 3187 return -ENOIOCTLCMD;