Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 183433
b: refs/heads/master
c: 82ecbcb
h: refs/heads/master
i:
  183431: 83dbb34
v: v3
  • Loading branch information
Rémi Denis-Courmont authored and David S. Miller committed Jan 7, 2010
1 parent 7f62642 commit be9b2e8
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: fea93ecef619b5779ca6984568517b1685079b05
refs/heads/master: 82ecbcb9c6b5257929968d5b0ed536772a9b4ac5
6 changes: 4 additions & 2 deletions trunk/net/phonet/datagram.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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)
Expand Down
10 changes: 9 additions & 1 deletion trunk/net/phonet/pep.c
Original file line number Diff line number Diff line change
Expand Up @@ -860,7 +860,9 @@ static int pep_sendmsg(struct kiocb *iocb, struct sock *sk,
int flags = msg->msg_flags;
int err, done;

if (msg->msg_flags & MSG_OOB || !(msg->msg_flags & MSG_EOR))
if ((msg->msg_flags & ~(MSG_DONTWAIT|MSG_EOR|MSG_NOSIGNAL|
MSG_CMSG_COMPAT)) ||
!(msg->msg_flags & MSG_EOR))
return -EOPNOTSUPP;

skb = sock_alloc_send_skb(sk, MAX_PNPIPE_HEADER + len,
Expand Down Expand Up @@ -981,13 +983,19 @@ static int pep_recvmsg(struct kiocb *iocb, struct sock *sk,
struct sk_buff *skb;
int err;

if (flags & ~(MSG_OOB|MSG_PEEK|MSG_TRUNC|MSG_DONTWAIT|MSG_WAITALL|
MSG_NOSIGNAL|MSG_CMSG_COMPAT))
return -EOPNOTSUPP;

if (unlikely(1 << sk->sk_state & (TCPF_LISTEN | TCPF_CLOSE)))
return -ENOTCONN;

if ((flags & MSG_OOB) || sock_flag(sk, SOCK_URGINLINE)) {
/* Dequeue and acknowledge control request */
struct pep_sock *pn = pep_sk(sk);

if (flags & MSG_PEEK)
return -EOPNOTSUPP;
skb = skb_dequeue(&pn->ctrlreq_queue);
if (skb) {
pep_ctrlreq_error(sk, skb, PN_PIPE_NO_ERROR,
Expand Down

0 comments on commit be9b2e8

Please sign in to comment.