mirror of
https://github.com/opnsense/src.git
synced 2026-06-09 08:43:19 -04:00
unix: Be consistent about error handling for unconnected sockets
SOCK_STREAM and SOCK_SEQPACKET sockets should get the same treatment
here.
PR: 176420
MFC after: 2 weeks
(cherry picked from commit 1c933f464f)
This commit is contained in:
parent
a158d26e89
commit
8373644ee2
1 changed files with 1 additions and 1 deletions
|
|
@ -1779,7 +1779,7 @@ uipc_ctloutput(struct socket *so, struct sockopt *sopt)
|
|||
if (unp->unp_flags & UNP_HAVEPC)
|
||||
xu = unp->unp_peercred;
|
||||
else {
|
||||
if (so->so_type == SOCK_STREAM)
|
||||
if (so->so_proto->pr_flags & PR_CONNREQUIRED)
|
||||
error = ENOTCONN;
|
||||
else
|
||||
error = EINVAL;
|
||||
|
|
|
|||
Loading…
Reference in a new issue