summaryrefslogtreecommitdiff
path: root/sys/kern
diff options
context:
space:
mode:
authorJun-ichiro itojun Hagino <itojun@cvs.openbsd.org>2001-05-25 22:08:26 +0000
committerJun-ichiro itojun Hagino <itojun@cvs.openbsd.org>2001-05-25 22:08:26 +0000
commitfbc9d5cd12dcc1ff564e70face6aff3cef21fbdc (patch)
tree5e04b4bb97753f6688d356d1587eb6e5509f451d /sys/kern
parent1d8271666d0bc69b7c8c1cfb481e5ed5e752b974 (diff)
recover old acecept(2) behavior (no ECONNABORTED) for unix domain socket.
it is to be friendly with postfix daemon-to-daemon communication (not 100% sure if which behavior is correct, specwise). patch similar to netbsd.
Diffstat (limited to 'sys/kern')
-rw-r--r--sys/kern/uipc_socket.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/kern/uipc_socket.c b/sys/kern/uipc_socket.c
index 854d804f124..42c4c4a1a0d 100644
--- a/sys/kern/uipc_socket.c
+++ b/sys/kern/uipc_socket.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: uipc_socket.c,v 1.33 2001/03/06 19:42:43 provos Exp $ */
+/* $OpenBSD: uipc_socket.c,v 1.34 2001/05/25 22:08:23 itojun Exp $ */
/* $NetBSD: uipc_socket.c,v 1.21 1996/02/04 02:17:52 christos Exp $ */
/*
@@ -266,7 +266,8 @@ soaccept(so, nam)
if ((so->so_state & SS_NOFDREF) == 0)
panic("soaccept: !NOFDREF");
so->so_state &= ~SS_NOFDREF;
- if ((so->so_state & SS_ISDISCONNECTED) == 0)
+ if ((so->so_state & SS_ISDISCONNECTED) == 0 ||
+ (so->so_proto->pr_flags & PR_ABRTACPTDIS) == 0)
error = (*so->so_proto->pr_usrreq)(so, PRU_ACCEPT, NULL,
nam, NULL);
else