Skip to content

Commit

Permalink
Revert "rose: zero length frame filtering in af_rose.c"
Browse files Browse the repository at this point in the history
This reverts commit 244f46a.

Alan Cox did the research, and just like the other radio protocols
zero-length frames have meaning because at the top level ROSE is
X.25 PLP.

So this zero-length filtering is invalid.

Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
David S. Miller committed Apr 15, 2009
1 parent 239795a commit 6fd4777
Showing 1 changed file with 0 additions and 10 deletions.
10 changes: 0 additions & 10 deletions net/rose/af_rose.c
Original file line number Diff line number Diff line change
Expand Up @@ -1072,10 +1072,6 @@ 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 @@ -1273,12 +1269,6 @@ 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 6fd4777

Please sign in to comment.