summaryrefslogtreecommitdiffstats
path: root/net/rose
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2008-11-26 23:48:40 -0800
committerDavid S. Miller <davem@davemloft.net>2008-11-26 23:48:40 -0800
commit5b9ab2ec04ec1e1e53939768805612ac191d7ba2 (patch)
tree22d29905c148d2d743b3eccb585fbe60fb91e25a /net/rose
parent851fd7bd88524bb4e20f3def3127cd9167d6d0cf (diff)
parent3ec192559033ed457f0d7856838654c100fc659f (diff)
downloadlinux-5b9ab2ec04ec1e1e53939768805612ac191d7ba2.tar.bz2
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Conflicts: drivers/net/hp-plus.c drivers/net/wireless/ath5k/base.c drivers/net/wireless/ath9k/recv.c net/wireless/reg.c
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 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;