mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-05 22:28:00 +00:00
Revert "rose: zero length frame filtering in af_rose.c"
This reverts commit 244f46ae6e
.
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>
This commit is contained in:
parent
239795adf7
commit
6fd4777a1f
1 changed files with 0 additions and 10 deletions
|
@ -1072,10 +1072,6 @@ static int rose_sendmsg(struct kiocb *iocb, struct socket *sock,
|
||||||
unsigned char *asmptr;
|
unsigned char *asmptr;
|
||||||
int n, size, qbit = 0;
|
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))
|
if (msg->msg_flags & ~(MSG_DONTWAIT|MSG_EOR|MSG_CMSG_COMPAT))
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
||||||
|
@ -1273,12 +1269,6 @@ static int rose_recvmsg(struct kiocb *iocb, struct socket *sock,
|
||||||
skb_reset_transport_header(skb);
|
skb_reset_transport_header(skb);
|
||||||
copied = skb->len;
|
copied = skb->len;
|
||||||
|
|
||||||
/* ROSE empty frame has no meaning : ignore it */
|
|
||||||
if (copied == 0) {
|
|
||||||
skb_free_datagram(sk, skb);
|
|
||||||
return copied;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (copied > size) {
|
if (copied > size) {
|
||||||
copied = size;
|
copied = size;
|
||||||
msg->msg_flags |= MSG_TRUNC;
|
msg->msg_flags |= MSG_TRUNC;
|
||||||
|
|
Loading…
Add table
Reference in a new issue