Author: glebius Date: Wed Jan 25 22:26:45 2017 New Revision: 312784 URL: https://svnweb.freebsd.org/changeset/base/312784
Log: For non-listening AF_UNIX sockets return error code EOPNOTSUPP to match documentation and SUS. Modified: head/sys/kern/uipc_usrreq.c Modified: head/sys/kern/uipc_usrreq.c ============================================================================== --- head/sys/kern/uipc_usrreq.c Wed Jan 25 21:35:15 2017 (r312783) +++ head/sys/kern/uipc_usrreq.c Wed Jan 25 22:26:45 2017 (r312784) @@ -743,6 +743,9 @@ uipc_listen(struct socket *so, int backl struct unpcb *unp; int error; + if (so->so_type != SOCK_STREAM && so->so_type != SOCK_SEQPACKET) + return (EOPNOTSUPP); + unp = sotounpcb(so); KASSERT(unp != NULL, ("uipc_listen: unp == NULL")); _______________________________________________ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"