Skip to content

Commit

Permalink
Revert "net/ieee802154: reject zero-sized raw_sendmsg()"
Browse files Browse the repository at this point in the history
[ Upstream commit 2eb2756 ]

This reverts commit 3a4d061.

There is a v2 which does return zero if zero length is given.

Signed-off-by: Alexander Aring <aahringo@redhat.com>
Link: https://lore.kernel.org/r/20221005014750.3685555-1-aahringo@redhat.com
Signed-off-by: Stefan Schmidt <stefan@datenfreihafen.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
  • Loading branch information
Alexander Aring authored and gregkh committed Oct 21, 2022
1 parent 590e878 commit 4b86217
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions net/ieee802154/socket.c
Original file line number Diff line number Diff line change
Expand Up @@ -251,9 +251,6 @@ static int raw_sendmsg(struct sock *sk, struct msghdr *msg, size_t size)
return -EOPNOTSUPP;
}

if (!size)
return -EINVAL;

lock_sock(sk);
if (!sk->sk_bound_dev_if)
dev = dev_getfirstbyhwtype(sock_net(sk), ARPHRD_IEEE802154);
Expand Down

0 comments on commit 4b86217

Please sign in to comment.