diff options
author | David S. Miller <davem@davemloft.net> | 2008-11-27 02:48:40 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-11-27 02:48:40 -0500 |
commit | 5b9ab2ec04ec1e1e53939768805612ac191d7ba2 (patch) | |
tree | 22d29905c148d2d743b3eccb585fbe60fb91e25a /net/rose | |
parent | 851fd7bd88524bb4e20f3def3127cd9167d6d0cf (diff) | |
parent | 3ec192559033ed457f0d7856838654c100fc659f (diff) |
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.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, | |||
1072 | unsigned char *asmptr; | 1072 | unsigned char *asmptr; |
1073 | int n, size, qbit = 0; | 1073 | int n, size, qbit = 0; |
1074 | 1074 | ||
1075 | /* ROSE empty frame has no meaning : don't send */ | ||
1076 | if (len == 0) | ||
1077 | return 0; | ||
1078 | |||
1075 | if (msg->msg_flags & ~(MSG_DONTWAIT|MSG_EOR|MSG_CMSG_COMPAT)) | 1079 | if (msg->msg_flags & ~(MSG_DONTWAIT|MSG_EOR|MSG_CMSG_COMPAT)) |
1076 | return -EINVAL; | 1080 | return -EINVAL; |
1077 | 1081 | ||
@@ -1265,6 +1269,12 @@ static int rose_recvmsg(struct kiocb *iocb, struct socket *sock, | |||
1265 | skb_reset_transport_header(skb); | 1269 | skb_reset_transport_header(skb); |
1266 | copied = skb->len; | 1270 | copied = skb->len; |
1267 | 1271 | ||
1272 | /* ROSE empty frame has no meaning : ignore it */ | ||
1273 | if (copied == 0) { | ||
1274 | skb_free_datagram(sk, skb); | ||
1275 | return copied; | ||
1276 | } | ||
1277 | |||
1268 | if (copied > size) { | 1278 | if (copied > size) { |
1269 | copied = size; | 1279 | copied = size; |
1270 | msg->msg_flags |= MSG_TRUNC; | 1280 | msg->msg_flags |= MSG_TRUNC; |