Page MenuHomeFreeBSD

sockets: return EMSGSIZE if control part of message is too large
ClosedPublic

Authored by glebius on May 25 2022, 7:30 AM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Nov 1, 11:15 PM
Unknown Object (File)
Tue, Oct 22, 6:39 PM
Unknown Object (File)
Sep 23 2024, 12:10 AM
Unknown Object (File)
Sep 23 2024, 12:10 AM
Unknown Object (File)
Sep 23 2024, 12:10 AM
Unknown Object (File)
Sep 22 2024, 11:59 PM
Unknown Object (File)
Sep 18 2024, 2:47 PM
Unknown Object (File)
Sep 18 2024, 6:24 AM
Subscribers

Details

Summary

Specification doesn't list an explicit error code for the control
size specified by msg_control being too large. But it does list
EMSGSIZE as error code for "message is too large to be sent all at
once (as the socket requires)". It also lists EINVAL as code for
the "The sum of the iov_len values overflows an ssize_t." Given
how generic and uninformative EINVAL is, the EMSGSIZE is more
appropriate.

https://pubs.opengroup.org/onlinepubs/9699919799/functions/sendmsg.html

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable