aboutsummaryrefslogtreecommitdiffstats
path: root/net/phonet/datagram.c
diff options
context:
space:
mode:
authorRémi Denis-Courmont <remi.denis-courmont@nokia.com>2010-01-04 02:02:49 +0000
committerDavid S. Miller <davem@davemloft.net>2010-01-07 00:24:55 -0800
commit82ecbcb9c6b5257929968d5b0ed536772a9b4ac5 (patch)
treec147c743bc284709f87ba677048757a3b4547357 /net/phonet/datagram.c
parentfea93ecef619b5779ca6984568517b1685079b05 (diff)
Phonet: reject unsupported sendmsg/recvmsg flags
Signed-off-by: Rémi Denis-Courmont <remi.denis-courmont@nokia.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/phonet/datagram.c')
-rw-r--r--net/phonet/datagram.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/net/phonet/datagram.c b/net/phonet/datagram.c
index 67f072e94d00..387197b579b1 100644
--- a/net/phonet/datagram.c
+++ b/net/phonet/datagram.c
@@ -75,7 +75,8 @@ static int pn_sendmsg(struct kiocb *iocb, struct sock *sk,
struct sk_buff *skb;
int err;
- if (msg->msg_flags & MSG_OOB)
+ if (msg->msg_flags & ~(MSG_DONTWAIT|MSG_EOR|MSG_NOSIGNAL|
+ MSG_CMSG_COMPAT))
return -EOPNOTSUPP;
if (msg->msg_name == NULL)
@@ -119,7 +120,8 @@ static int pn_recvmsg(struct kiocb *iocb, struct sock *sk,
int rval = -EOPNOTSUPP;
int copylen;
- if (flags & MSG_OOB)
+ if (flags & ~(MSG_PEEK|MSG_TRUNC|MSG_DONTWAIT|MSG_NOSIGNAL|
+ MSG_CMSG_COMPAT))
goto out_nofree;
if (addr_len)

Privacy Policy