Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 119611
b: refs/heads/master
c: 244f46a
h: refs/heads/master
i:
  119609: d3b32f0
  119607: 3de4171
v: v3
  • Loading branch information
Bernard Pidoux authored and David S. Miller committed Nov 25, 2008
1 parent 492140d commit dfb80d0
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 631339f1e544a4d39a63cfe6708c5bddcd5a2c48
refs/heads/master: 244f46ae6e9e18f6fc0be7d1f49febde4762c34b
10 changes: 10 additions & 0 deletions trunk/net/rose/af_rose.c
Original file line number Diff line number Diff line change
Expand Up @@ -1072,6 +1072,10 @@ static int rose_sendmsg(struct kiocb *iocb, struct socket *sock,
unsigned char *asmptr;
int n, size, qbit = 0;

/* ROSE empty frame has no meaning : don't send */
if (len == 0)
return 0;

if (msg->msg_flags & ~(MSG_DONTWAIT|MSG_EOR|MSG_CMSG_COMPAT))
return -EINVAL;

Expand Down Expand Up @@ -1265,6 +1269,12 @@ static int rose_recvmsg(struct kiocb *iocb, struct socket *sock,
skb_reset_transport_header(skb);
copied = skb->len;

/* ROSE empty frame has no meaning : ignore it */
if (copied == 0) {
skb_free_datagram(sk, skb);
return copied;
}

if (copied > size) {
copied = size;
msg->msg_flags |= MSG_TRUNC;
Expand Down

0 comments on commit dfb80d0

Please sign in to comment.