]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Let listen() return EDESTADDRREQ when not bound.
authorEd Schouten <ed@FreeBSD.org>
Fri, 10 Jul 2015 06:47:14 +0000 (06:47 +0000)
committerEd Schouten <ed@FreeBSD.org>
Fri, 10 Jul 2015 06:47:14 +0000 (06:47 +0000)
commit47a84387ad7dc15ea9f042f1748574df4bf293f4
tree961d12c4241db9fc8ed403d4ea8f6fbea5c0fead
parent847bf38369b6ea5abf8b6409006468cfe4f66d5e
Let listen() return EDESTADDRREQ when not bound.

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.

Differential Revision: https://reviews.freebsd.org/D3038
Reviewed by: gnn, network
sys/kern/uipc_usrreq.c