Commit 8bc5f4e8 authored by David S. Miller's avatar David S. Miller

[COMPAT]: TUNSETIFF needs to copy back data after ioctl.

It is defined as a _IOW() which is erroneous, it should
have been defined as _IORW() but that cannot be changed
now without breaking all existing applications using this
ioctl.
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent d14d4021
...@@ -687,6 +687,11 @@ static int dev_ifsioc(unsigned int fd, unsigned int cmd, unsigned long arg) ...@@ -687,6 +687,11 @@ static int dev_ifsioc(unsigned int fd, unsigned int cmd, unsigned long arg)
set_fs (old_fs); set_fs (old_fs);
if (!err) { if (!err) {
switch (cmd) { switch (cmd) {
/* TUNSETIFF is defined as _IOW, it should be _IORW
* as the data is copied back to user space, but that
* cannot be fixed without breaking all existing apps.
*/
case TUNSETIFF:
case SIOCGIFFLAGS: case SIOCGIFFLAGS:
case SIOCGIFMETRIC: case SIOCGIFMETRIC:
case SIOCGIFMTU: case SIOCGIFMTU:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment