summaryrefslogtreecommitdiffstats
path: root/sys/kern/uipc_socket.c
diff options
context:
space:
mode:
authorguenther <guenther@openbsd.org>2018-04-08 18:57:39 +0000
committerguenther <guenther@openbsd.org>2018-04-08 18:57:39 +0000
commit0c4143b58cc01c54b6213011c3331cd662195f4c (patch)
treed43d82e1cf362f097a2c58e3a1dbf4e5323a7ca6 /sys/kern/uipc_socket.c
parentActually describe the parameters rather than calling facts BUGS (diff)
downloadwireguard-openbsd-0c4143b58cc01c54b6213011c3331cd662195f4c.tar.xz
wireguard-openbsd-0c4143b58cc01c54b6213011c3331cd662195f4c.zip
AF_LOCAL was a failed attempt (by POSIX?) to seem less UNIX-specific, but
AF_UNIX is both the historical _and_ standard name, so prefer and recommend it in the headers, manpages, and kernel. ok miller@ deraadt@ schwarze@
Diffstat (limited to 'sys/kern/uipc_socket.c')
-rw-r--r--sys/kern/uipc_socket.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/kern/uipc_socket.c b/sys/kern/uipc_socket.c
index 7d125c7869c..c47209e8c2a 100644
--- a/sys/kern/uipc_socket.c
+++ b/sys/kern/uipc_socket.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: uipc_socket.c,v 1.219 2018/03/27 08:27:29 mpi Exp $ */
+/* $OpenBSD: uipc_socket.c,v 1.220 2018/04/08 18:57:39 guenther Exp $ */
/* $NetBSD: uipc_socket.c,v 1.21 1996/02/04 02:17:52 christos Exp $ */
/*
@@ -419,8 +419,8 @@ sosend(struct socket *so, struct mbuf *addr, struct uio *uio, struct mbuf *top,
* of space and clen.
*/
clen = control->m_len;
- /* reserve extra space for AF_LOCAL's internalize */
- if (so->so_proto->pr_domain->dom_family == AF_LOCAL &&
+ /* reserve extra space for AF_UNIX's internalize */
+ if (so->so_proto->pr_domain->dom_family == AF_UNIX &&
clen >= CMSG_ALIGN(sizeof(struct cmsghdr)) &&
mtod(control, struct cmsghdr *)->cmsg_type == SCM_RIGHTS)
clen = CMSG_SPACE(
@@ -454,7 +454,7 @@ restart:
if (flags & MSG_OOB)
space += 1024;
if ((atomic && resid > so->so_snd.sb_hiwat) ||
- (so->so_proto->pr_domain->dom_family != AF_LOCAL &&
+ (so->so_proto->pr_domain->dom_family != AF_UNIX &&
clen > so->so_snd.sb_hiwat))
snderr(EMSGSIZE);
if (space < clen ||