Commit 20660221 authored by Arnd Bergmann's avatar Arnd Bergmann Committed by David S. Miller

appletalk: handle SIOCATALKDIFADDR compat ioctl

We must not have a compat ioctl handler for SIOCATALKDIFADDR
in common code, because the same number is used in other protocols
with different data structures.
Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 7a229387
......@@ -2536,7 +2536,6 @@ HANDLE_IOCTL(SIOCSIFHWBROADCAST, dev_ifsioc)
HANDLE_IOCTL(SIOCSHWTSTAMP, dev_ifsioc)
/* ioctls used by appletalk ddp.c */
HANDLE_IOCTL(SIOCATALKDIFADDR, dev_ifsioc)
HANDLE_IOCTL(SIOCDIFADDR, dev_ifsioc)
HANDLE_IOCTL(SIOCSARP, dev_ifsioc)
HANDLE_IOCTL(SIOCDARP, dev_ifsioc)
......
......@@ -1811,12 +1811,14 @@ static int atalk_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg)
static int atalk_compat_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg)
{
/*
* All Appletalk ioctls except SIOCATALKDIFADDR are standard. And
* SIOCATALKDIFADDR is handled by upper layer as well, so there is
* nothing to do. Eventually SIOCATALKDIFADDR should be moved
* here so there is no generic SIOCPROTOPRIVATE translation in the
* system.
* SIOCATALKDIFADDR is a SIOCPROTOPRIVATE ioctl number, so we
* cannot handle it in common code. The data we access if ifreq
* here is compatible, so we can simply call the native
* handler.
*/
if (cmd == SIOCATALKDIFADDR)
return atalk_ioctl(sock, cmd, (unsigned long)compat_ptr(arg));
return -ENOIOCTLCMD;
}
#endif
......
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