aboutsummaryrefslogtreecommitdiff
path: root/net/rose
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2008-12-08 15:07:49 +0100
committerIngo Molnar <mingo@elte.hu>2008-12-08 15:07:49 +0100
commitaa9c9b8c584a42a094202b7e0f63497e888f86a7 (patch)
tree3cb3b022054a7c1722657288518f495e0c4d9983 /net/rose
parent87f7606591aea6a8a38ea4c8911b5eeeee2740b8 (diff)
parent218d11a8b071b23b76c484fd5f72a4fe3306801e (diff)
Merge branch 'linus' into x86/quirks
Diffstat (limited to 'net/rose')
-rw-r--r--net/rose/af_rose.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/net/rose/af_rose.c b/net/rose/af_rose.c
index a7f1ce11bc2..0c1cc761280 100644
--- a/net/rose/af_rose.c
+++ b/net/rose/af_rose.c
@@ -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;
@@ -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;