forked from Minki/linux
ieee802154 socket: Return EMSGSIZE from raw_sendmsg() if packet too big.
The proper return code for trying to send a packet that exceeds the outgoing interface's MTU is EMSGSIZE, not EINVAL, so patch ieee802154's raw_sendmsg() to do the right thing. (Its dgram_sendmsg() was already returning EMSGSIZE for this case.) Signed-off-by: Lennert Buytenhek <buytenh@wantstofly.org> Acked-by: Alexander Aring <alex.aring@gmail.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
This commit is contained in:
parent
e34fd879f5
commit
c032705ebf
@ -284,7 +284,7 @@ static int raw_sendmsg(struct sock *sk, struct msghdr *msg, size_t size)
|
||||
|
||||
if (size > mtu) {
|
||||
pr_debug("size = %Zu, mtu = %u\n", size, mtu);
|
||||
err = -EINVAL;
|
||||
err = -EMSGSIZE;
|
||||
goto out_dev;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user