Page MenuHomeFreeBSD

Let listen() return EDESTADDRREQ when not bound.
ClosedPublic

Authored by ed on Jul 9 2015, 12:51 PM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Apr 26, 6:38 AM
Unknown Object (File)
Fri, Apr 26, 6:24 AM
Unknown Object (File)
Dec 19 2023, 10:38 PM
Unknown Object (File)
Aug 2 2023, 6:31 PM
Unknown Object (File)
Jul 15 2023, 10:31 PM
Unknown Object (File)
May 18 2023, 2:20 PM
Unknown Object (File)
Nov 26 2022, 8:49 AM
Unknown Object (File)
Apr 11 2017, 7:17 AM
Subscribers

Details

Summary

We currently return EINVAL when calling listen() on a UNIX socket that has not been bound to a pathname. If my interpretation of POSIX is correct, we should return EDESTADDRREQ: "The socket is not bound to a local address, and the protocol does not support listening on an unbound socket."

Return EDESTADDRREQ instead when not bound and not connected.

Test Plan

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

ed retitled this revision from to Let listen() return EDESTADDREQ when not bound..
ed updated this object.
ed edited the test plan for this revision. (Show Details)
ed added reviewers: glebius, kib.
ed set the repository for this revision to rS FreeBSD src repository - subversion.
kib added a reviewer: network.
kib removed a reviewer: kib.
ed retitled this revision from Let listen() return EDESTADDREQ when not bound. to Let listen() return EDESTADDRREQ when not bound..Jul 9 2015, 1:00 PM
ed updated this object.
ed added a reviewer: kib.
gnn added a reviewer: gnn.
gnn added a subscriber: gnn.

I don't know about POSIX but I do think that this is a good idea and a better error to return in this case.

This revision is now accepted and ready to land.Jul 9 2015, 1:07 PM
In D3038#59923, @gnn wrote:

I don't know about POSIX but I do think that this is a good idea and a better error to return in this case.

Perfect! Thanks for the quick review! I'll leave this code review open for another day. Will push it in if no one else objects.

This revision was automatically updated to reflect the committed changes.