aboutsummaryrefslogtreecommitdiff
path: root/net/ipx/af_ipx.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@g5.osdl.org>2006-03-29 11:29:33 -0800
committerLinus Torvalds <torvalds@g5.osdl.org>2006-03-29 11:29:33 -0800
commitf3cab8a0b1a772dc8b055b7affa567a366627c9e (patch)
tree39c4736047e7f1f6617a4703b3ebf62df1d68d34 /net/ipx/af_ipx.c
parent76babde121d2ffef04ca692ce64ef9f8a9866086 (diff)
parent65b4b4e81a5094d52cbe372b887b1779abe53f9b (diff)
Merge master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
* master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6: [NETFILTER]: Rename init functions. [TCP]: Fix RFC2465 typo. [INET]: Introduce tunnel4/tunnel6 [NET]: deinline 200+ byte inlines in sock.h [ECONET]: Convert away from SOCKOPS_WRAPPED [NET]: Fix ipx/econet/appletalk/irda ioctl crashes [NET]: Kill Documentation/networking/TODO [TG3]: Update version and reldate [TG3]: Skip timer code during full lock [TG3]: Speed up SRAM access [TG3]: Fix PHY loopback on 5700 [TG3]: Fix bug in 40-bit DMA workaround code [TG3]: Fix probe failure due to invalid MAC address
Diffstat (limited to 'net/ipx/af_ipx.c')
-rw-r--r--net/ipx/af_ipx.c26
1 files changed, 26 insertions, 0 deletions
diff --git a/net/ipx/af_ipx.c b/net/ipx/af_ipx.c
index 0fb513a34d1..2dbf134d526 100644
--- a/net/ipx/af_ipx.c
+++ b/net/ipx/af_ipx.c
@@ -1892,6 +1892,29 @@ static int ipx_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg)
return rc;
}
+
+#ifdef CONFIG_COMPAT
+static int ipx_compat_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg)
+{
+ /*
+ * These 4 commands use same structure on 32bit and 64bit. Rest of IPX
+ * commands is handled by generic ioctl code. As these commands are
+ * SIOCPROTOPRIVATE..SIOCPROTOPRIVATE+3, they cannot be handled by generic
+ * code.
+ */
+ switch (cmd) {
+ case SIOCAIPXITFCRT:
+ case SIOCAIPXPRISLT:
+ case SIOCIPXCFGDATA:
+ case SIOCIPXNCPCONN:
+ return ipx_ioctl(sock, cmd, arg);
+ default:
+ return -ENOIOCTLCMD;
+ }
+}
+#endif
+
+
/*
* Socket family declarations
*/
@@ -1913,6 +1936,9 @@ static const struct proto_ops SOCKOPS_WRAPPED(ipx_dgram_ops) = {
.getname = ipx_getname,
.poll = datagram_poll,
.ioctl = ipx_ioctl,
+#ifdef CONFIG_COMPAT
+ .compat_ioctl = ipx_compat_ioctl,
+#endif
.listen = sock_no_listen,
.shutdown = sock_no_shutdown, /* FIXME: support shutdown */
.setsockopt = ipx_setsockopt,