Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f9dd11b0 authored by João Paulo Rechi Vita's avatar João Paulo Rechi Vita Committed by Marcel Holtmann
Browse files

Bluetooth: Fix error return value on sendmsg.



When we try to send a message bigger than the outgoing MTU value
EMSGSIZE (message too long) should be returned.

Signed-off-by: default avatarJoão Paulo Rechi Vita <jprvita@profusion.mobi>
Acked-by: default avatarGustavo F. Padovan <padovan@profusion.mobi>
Signed-off-by: default avatarMarcel Holtmann <marcel@holtmann.org>
parent 305682e8
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1827,7 +1827,7 @@ static int l2cap_sock_sendmsg(struct kiocb *iocb, struct socket *sock, struct ms
	case L2CAP_MODE_BASIC:
		/* Check outgoing MTU */
		if (len > pi->omtu) {
			err = -EINVAL;
			err = -EMSGSIZE;
			goto done;
		}