diff options
author | David S. Miller <davem@davemloft.net> | 2009-03-27 20:23:42 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-03-27 20:23:42 -0400 |
commit | c44a4366649aca4f5b4a51ff71d4c9cde3b7c9da (patch) | |
tree | 7c0a293ab86f07c584d679739253dc4c2cc8d45f | |
parent | 80e20f6f360078b4852eac6825883e5aa25564bb (diff) |
Revert "ax25: zero length frame filtering in AX25"
This reverts commit f99bcff7a290768e035f3d4726e103c6ebe858bf.
Like netrom, Alan Cox says that zero lengths have real meaning
and are useful in this protocol.
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | net/ax25/af_ax25.c | 12 |
1 files changed, 0 insertions, 12 deletions
diff --git a/net/ax25/af_ax25.c b/net/ax25/af_ax25.c index 7da5ebb84e97..fd9d06f291dc 100644 --- a/net/ax25/af_ax25.c +++ b/net/ax25/af_ax25.c | |||
@@ -1435,11 +1435,6 @@ static int ax25_sendmsg(struct kiocb *iocb, struct socket *sock, | |||
1435 | size_t size; | 1435 | size_t size; |
1436 | int lv, err, addr_len = msg->msg_namelen; | 1436 | int lv, err, addr_len = msg->msg_namelen; |
1437 | 1437 | ||
1438 | /* AX.25 empty data frame has no meaning : don't send */ | ||
1439 | if (len == 0) { | ||
1440 | return (0); | ||
1441 | } | ||
1442 | |||
1443 | if (msg->msg_flags & ~(MSG_DONTWAIT|MSG_EOR|MSG_CMSG_COMPAT)) | 1438 | if (msg->msg_flags & ~(MSG_DONTWAIT|MSG_EOR|MSG_CMSG_COMPAT)) |
1444 | return -EINVAL; | 1439 | return -EINVAL; |
1445 | 1440 | ||
@@ -1639,13 +1634,6 @@ static int ax25_recvmsg(struct kiocb *iocb, struct socket *sock, | |||
1639 | skb_reset_transport_header(skb); | 1634 | skb_reset_transport_header(skb); |
1640 | copied = skb->len; | 1635 | copied = skb->len; |
1641 | 1636 | ||
1642 | /* AX.25 empty data frame has no meaning : ignore it */ | ||
1643 | if (copied == 0) { | ||
1644 | err = copied; | ||
1645 | skb_free_datagram(sk, skb); | ||
1646 | goto out; | ||
1647 | } | ||
1648 | |||
1649 | if (copied > size) { | 1637 | if (copied > size) { |
1650 | copied = size; | 1638 | copied = size; |
1651 | msg->msg_flags |= MSG_TRUNC; | 1639 | msg->msg_flags |= MSG_TRUNC; |