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)
Mon, Mar 25, 5:00 PM
Unknown Object (File)
Mar 11 2024, 2:21 AM
Unknown Object (File)
Mar 11 2024, 2:21 AM
Unknown Object (File)
Mar 11 2024, 2:21 AM
Unknown Object (File)
Mar 11 2024, 2:08 AM
Unknown Object (File)
Mar 10 2024, 6:50 AM
Unknown Object (File)
Mar 7 2024, 8:12 PM
Unknown Object (File)
Feb 15 2024, 1:54 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