Home Home > GIT Browse
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOlaf Hering <olh@suse.de>2004-06-05 01:55:25 -0700
committerLinus Torvalds <torvalds@ppc970.osdl.org>2004-06-05 01:55:25 -0700
commite6b6c7ee2f431639a048e4f929b9c210411089e3 (patch)
tree670599f48366feeefe47e126eeafe1dc39a900bd
parent21eca083b28bd98d7b8024188220db507a7fd67d (diff)
[NET]: Fix compat bug in recvmsg/sendmsg wrt MSG_CMSG_COMPAT.
-rw-r--r--net/appletalk/ddp.c2
-rw-r--r--net/ax25/af_ax25.c3
-rw-r--r--net/decnet/af_decnet.c2
-rw-r--r--net/econet/af_econet.c4
-rw-r--r--net/ipx/af_ipx.c2
-rw-r--r--net/irda/af_irda.c6
-rw-r--r--net/key/af_key.c2
-rw-r--r--net/netrom/af_netrom.c2
-rw-r--r--net/packet/af_packet.c2
-rw-r--r--net/rose/af_rose.c2
-rw-r--r--net/wanrouter/af_wanpipe.c2
-rw-r--r--net/x25/af_x25.c2
12 files changed, 15 insertions, 16 deletions
diff --git a/net/appletalk/ddp.c b/net/appletalk/ddp.c
index a46971d14635..4170de1a078e 100644
--- a/net/appletalk/ddp.c
+++ b/net/appletalk/ddp.c
@@ -1567,7 +1567,7 @@ static int atalk_sendmsg(struct kiocb *iocb, struct socket *sock, struct msghdr
struct atalk_route *rt;
int err;
- if (flags & ~MSG_DONTWAIT)
+ if (flags & ~(MSG_DONTWAIT|MSG_CMSG_COMPAT))
return -EINVAL;
if (len > DDP_MAXSZ)
diff --git a/net/ax25/af_ax25.c b/net/ax25/af_ax25.c
index a96342872894..47fbd98e0e81 100644
--- a/net/ax25/af_ax25.c
+++ b/net/ax25/af_ax25.c
@@ -1413,9 +1413,8 @@ static int ax25_sendmsg(struct kiocb *iocb, struct socket *sock,
size_t size;
int lv, err, addr_len = msg->msg_namelen;
- if (msg->msg_flags & ~(MSG_DONTWAIT|MSG_EOR)) {
+ if (msg->msg_flags & ~(MSG_DONTWAIT|MSG_EOR|MSG_CMSG_COMPAT))
return -EINVAL;
- }
lock_sock(sk);
ax25 = ax25_sk(sk);
diff --git a/net/decnet/af_decnet.c b/net/decnet/af_decnet.c
index 5b9f78f12403..c08a80fd380d 100644
--- a/net/decnet/af_decnet.c
+++ b/net/decnet/af_decnet.c
@@ -1905,7 +1905,7 @@ static int dn_sendmsg(struct kiocb *iocb, struct socket *sock,
unsigned char fctype;
long timeo = sock_sndtimeo(sk, flags & MSG_DONTWAIT);
- if (flags & ~(MSG_TRYHARD|MSG_OOB|MSG_DONTWAIT|MSG_EOR|MSG_NOSIGNAL|MSG_MORE))
+ if (flags & ~(MSG_TRYHARD|MSG_OOB|MSG_DONTWAIT|MSG_EOR|MSG_NOSIGNAL|MSG_MORE|MSG_CMSG_COMPAT))
return -EOPNOTSUPP;
if (addr_len && (addr_len != sizeof(struct sockaddr_dn)))
diff --git a/net/econet/af_econet.c b/net/econet/af_econet.c
index 6bcfb5974de5..ce383ad7500a 100644
--- a/net/econet/af_econet.c
+++ b/net/econet/af_econet.c
@@ -274,8 +274,8 @@ static int econet_sendmsg(struct kiocb *iocb, struct socket *sock,
* Check the flags.
*/
- if (msg->msg_flags&~MSG_DONTWAIT)
- return(-EINVAL);
+ if (msg->msg_flags & ~(MSG_DONTWAIT|MSG_CMSG_COMPAT))
+ return -EINVAL;
/*
* Get and verify the address.
diff --git a/net/ipx/af_ipx.c b/net/ipx/af_ipx.c
index 321c75d160ff..163223daf47b 100644
--- a/net/ipx/af_ipx.c
+++ b/net/ipx/af_ipx.c
@@ -1695,7 +1695,7 @@ static int ipx_sendmsg(struct kiocb *iocb, struct socket *sock,
/* Socket gets bound below anyway */
/* if (sk->sk_zapped)
return -EIO; */ /* Socket not bound */
- if (flags & ~MSG_DONTWAIT)
+ if (flags & ~(MSG_DONTWAIT|MSG_CMSG_COMPAT))
goto out;
/* Max possible packet size limited by 16 bit pktsize in header */
diff --git a/net/irda/af_irda.c b/net/irda/af_irda.c
index 61f53e24ff01..c90c505edd68 100644
--- a/net/irda/af_irda.c
+++ b/net/irda/af_irda.c
@@ -1269,7 +1269,7 @@ static int irda_sendmsg(struct kiocb *iocb, struct socket *sock,
IRDA_DEBUG(4, "%s(), len=%d\n", __FUNCTION__, len);
/* Note : socket.c set MSG_EOR on SEQPACKET sockets */
- if (msg->msg_flags & ~(MSG_DONTWAIT | MSG_EOR))
+ if (msg->msg_flags & ~(MSG_DONTWAIT|MSG_EOR|MSG_CMSG_COMPAT))
return -EINVAL;
if (sk->sk_shutdown & SEND_SHUTDOWN) {
@@ -1521,7 +1521,7 @@ static int irda_sendmsg_dgram(struct kiocb *iocb, struct socket *sock,
IRDA_DEBUG(4, "%s(), len=%d\n", __FUNCTION__, len);
- if (msg->msg_flags & ~MSG_DONTWAIT)
+ if (msg->msg_flags & ~(MSG_DONTWAIT|MSG_CMSG_COMPAT))
return -EINVAL;
if (sk->sk_shutdown & SEND_SHUTDOWN) {
@@ -1593,7 +1593,7 @@ static int irda_sendmsg_ultra(struct kiocb *iocb, struct socket *sock,
IRDA_DEBUG(4, "%s(), len=%d\n", __FUNCTION__, len);
- if (msg->msg_flags & ~MSG_DONTWAIT)
+ if (msg->msg_flags & ~(MSG_DONTWAIT|MSG_CMSG_COMPAT))
return -EINVAL;
if (sk->sk_shutdown & SEND_SHUTDOWN) {
diff --git a/net/key/af_key.c b/net/key/af_key.c
index 419f67381c80..645b42564bd2 100644
--- a/net/key/af_key.c
+++ b/net/key/af_key.c
@@ -2726,7 +2726,7 @@ static int pfkey_recvmsg(struct kiocb *kiocb,
int copied, err;
err = -EINVAL;
- if (flags & ~(MSG_PEEK|MSG_DONTWAIT|MSG_TRUNC))
+ if (flags & ~(MSG_PEEK|MSG_DONTWAIT|MSG_TRUNC|MSG_CMSG_COMPAT))
goto out;
msg->msg_namelen = 0;
diff --git a/net/netrom/af_netrom.c b/net/netrom/af_netrom.c
index b761bebac124..fbb97bf3797e 100644
--- a/net/netrom/af_netrom.c
+++ b/net/netrom/af_netrom.c
@@ -1021,7 +1021,7 @@ static int nr_sendmsg(struct kiocb *iocb, struct socket *sock,
unsigned char *asmptr;
int size;
- if (msg->msg_flags & ~(MSG_DONTWAIT|MSG_EOR))
+ if (msg->msg_flags & ~(MSG_DONTWAIT|MSG_EOR|MSG_CMSG_COMPAT))
return -EINVAL;
lock_sock(sk);
diff --git a/net/packet/af_packet.c b/net/packet/af_packet.c
index 91e57eb8a24c..93ac3b310ceb 100644
--- a/net/packet/af_packet.c
+++ b/net/packet/af_packet.c
@@ -1037,7 +1037,7 @@ static int packet_recvmsg(struct kiocb *iocb, struct socket *sock,
int copied, err;
err = -EINVAL;
- if (flags & ~(MSG_PEEK|MSG_DONTWAIT|MSG_TRUNC))
+ if (flags & ~(MSG_PEEK|MSG_DONTWAIT|MSG_TRUNC|MSG_CMSG_COMPAT))
goto out;
#if 0
diff --git a/net/rose/af_rose.c b/net/rose/af_rose.c
index 009cc2dc2bb4..a5555c3280dd 100644
--- a/net/rose/af_rose.c
+++ b/net/rose/af_rose.c
@@ -1021,7 +1021,7 @@ static int rose_sendmsg(struct kiocb *iocb, struct socket *sock,
unsigned char *asmptr;
int n, size, qbit = 0;
- if (msg->msg_flags & ~(MSG_DONTWAIT|MSG_EOR))
+ if (msg->msg_flags & ~(MSG_DONTWAIT|MSG_EOR|MSG_CMSG_COMPAT))
return -EINVAL;
if (sk->sk_zapped)
diff --git a/net/wanrouter/af_wanpipe.c b/net/wanrouter/af_wanpipe.c
index d8ee5edfcc0e..4776ec1eaa86 100644
--- a/net/wanrouter/af_wanpipe.c
+++ b/net/wanrouter/af_wanpipe.c
@@ -552,7 +552,7 @@ static int wanpipe_sendmsg(struct kiocb *iocb, struct socket *sock,
if (sk->sk_state != WANSOCK_CONNECTED)
return -ENOTCONN;
- if (msg->msg_flags&~MSG_DONTWAIT)
+ if (msg->msg_flags & ~(MSG_DONTWAIT|MSG_CMSG_COMPAT))
return(-EINVAL);
/* it was <=, now one can send
diff --git a/net/x25/af_x25.c b/net/x25/af_x25.c
index 857dc981b981..17d20343aa85 100644
--- a/net/x25/af_x25.c
+++ b/net/x25/af_x25.c
@@ -922,7 +922,7 @@ static int x25_sendmsg(struct kiocb *iocb, struct socket *sock,
size_t size;
int qbit = 0, rc = -EINVAL;
- if (msg->msg_flags & ~(MSG_DONTWAIT | MSG_OOB | MSG_EOR))
+ if (msg->msg_flags & ~(MSG_DONTWAIT|MSG_OOB|MSG_EOR|MSG_CMSG_COMPAT))
goto out;
/* we currently don't support segmented records at the user interface */