diff options
author | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2008-12-20 12:54:54 +0300 |
---|---|---|
committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2008-12-20 12:54:54 +0300 |
commit | 93b8eef1c098efbea2f1fc0be7e3c681f259a7e7 (patch) | |
tree | 462cc8c2bc07bbc825dab2a200891a28d8643329 /net/rose/af_rose.c | |
parent | a2d781fc8d9b16113dd9440107d73c0f21d7cbef (diff) | |
parent | 929096fe9ff1f4b3645cf3919527ab47e8d5e17c (diff) | |
download | linux-93b8eef1c098efbea2f1fc0be7e3c681f259a7e7.tar.xz |
Merge commit 'v2.6.28-rc9' into next
Diffstat (limited to 'net/rose/af_rose.c')
-rw-r--r-- | net/rose/af_rose.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/net/rose/af_rose.c b/net/rose/af_rose.c index a7f1ce11bc22..0c1cc7612800 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; |