diff options
author | Lennert Buytenhek <buytenh@wantstofly.org> | 2015-05-25 15:38:24 +0300 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2015-05-26 18:07:39 +0200 |
commit | c032705ebfed32a6dcda72d83c54f060d4bf1e6e (patch) | |
tree | 836f412c7365ddcf88851ace991b90b397bfecf8 /net/ieee802154 | |
parent | e34fd879f5516496c7241c9c2caf3a108295a30c (diff) | |
download | blackbird-op-linux-c032705ebfed32a6dcda72d83c54f060d4bf1e6e.tar.gz blackbird-op-linux-c032705ebfed32a6dcda72d83c54f060d4bf1e6e.zip |
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>
Diffstat (limited to 'net/ieee802154')
-rw-r--r-- | net/ieee802154/socket.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/ieee802154/socket.c b/net/ieee802154/socket.c index e5cc2537c2a3..d9fc5ccb1d0d 100644 --- a/net/ieee802154/socket.c +++ b/net/ieee802154/socket.c @@ -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; } |