提交 198a291c 编写于 作者: P Patrick McHardy 提交者: David S. Miller

[VLAN]: Remove non-implemented ioctls

The GET_VLAN_INGRESS_PRIORITY_CMD/GET_VLAN_EGRESS_PRIORITY_CMD ioctls are
not implemented and won't be, new functionality will be added to the netlink
interface. Remove the code and make the ioctl handler return -EOPNOTSUPP
for unknown commands instead of -EINVAL.

Also remove a comment about passing unknown commands to the underlying
device, that doesn't make any sense since its a VLAN specific ioctl and
if its not implemented here, its implemented nowhere.
Signed-off-by: NPatrick McHardy <kaber@trash.net>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 40f98e1a
...@@ -688,26 +688,6 @@ static int vlan_ioctl_handler(struct net *net, void __user *arg) ...@@ -688,26 +688,6 @@ static int vlan_ioctl_handler(struct net *net, void __user *arg)
err = unregister_vlan_device(dev); err = unregister_vlan_device(dev);
break; break;
case GET_VLAN_INGRESS_PRIORITY_CMD:
/* TODO: Implement
err = vlan_dev_get_ingress_priority(args);
if (copy_to_user((void*)arg, &args,
sizeof(struct vlan_ioctl_args))) {
err = -EFAULT;
}
*/
err = -EINVAL;
break;
case GET_VLAN_EGRESS_PRIORITY_CMD:
/* TODO: Implement
err = vlan_dev_get_egress_priority(args.device1, &(args.args);
if (copy_to_user((void*)arg, &args,
sizeof(struct vlan_ioctl_args))) {
err = -EFAULT;
}
*/
err = -EINVAL;
break;
case GET_VLAN_REALDEV_NAME_CMD: case GET_VLAN_REALDEV_NAME_CMD:
err = 0; err = 0;
vlan_dev_get_realdev_name(dev, args.u.device2); vlan_dev_get_realdev_name(dev, args.u.device2);
...@@ -728,8 +708,7 @@ static int vlan_ioctl_handler(struct net *net, void __user *arg) ...@@ -728,8 +708,7 @@ static int vlan_ioctl_handler(struct net *net, void __user *arg)
break; break;
default: default:
/* pass on to underlying device instead?? */ err = -EOPNOTSUPP;
err = -EINVAL;
break; break;
} }
out: out:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册