]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Let listen() return EDESTADDRREQ when not bound.
authored <ed@FreeBSD.org>
Fri, 10 Jul 2015 06:47:14 +0000 (06:47 +0000)
committered <ed@FreeBSD.org>
Fri, 10 Jul 2015 06:47:14 +0000 (06:47 +0000)
commit790c476c1a960dc345d9eb1338ed3a9fad115586
tree961d12c4241db9fc8ed403d4ea8f6fbea5c0fead
parentc354cad8fde9b680d7f14a49789fbb1063153772
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