diff options
author | 2001-02-07 12:20:42 +0000 | |
---|---|---|
committer | 2001-02-07 12:20:42 +0000 | |
commit | 182c406e43e16399b75ab2d84aef9ff85141f1de (patch) | |
tree | 3f3817bccfe2f87e6fbd18dbcee6237f7c159590 | |
parent | mention ND6_DEBUG (diff) | |
download | wireguard-openbsd-182c406e43e16399b75ab2d84aef9ff85141f1de.tar.xz wireguard-openbsd-182c406e43e16399b75ab2d84aef9ff85141f1de.zip |
return ECONNABORTED, if the socket (tcp connection for example)
is disconnected by RST right before accept(2). fixes NetBSD PR 10698/12027.
checked with SUSv2, XNET 5.2, and Stevens (unix network programming
vol 1 2nd ed) section 5.11.
-rw-r--r-- | sys/kern/uipc_socket.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/kern/uipc_socket.c b/sys/kern/uipc_socket.c index d2e71f2c956..8b36265424e 100644 --- a/sys/kern/uipc_socket.c +++ b/sys/kern/uipc_socket.c @@ -1,4 +1,4 @@ -/* $OpenBSD: uipc_socket.c,v 1.29 2001/01/23 02:18:55 itojun Exp $ */ +/* $OpenBSD: uipc_socket.c,v 1.30 2001/02/07 12:20:42 itojun Exp $ */ /* $NetBSD: uipc_socket.c,v 1.21 1996/02/04 02:17:52 christos Exp $ */ /* @@ -272,7 +272,7 @@ soaccept(so, nam) error = (*so->so_proto->pr_usrreq)(so, PRU_ACCEPT, NULL, nam, NULL); else - nam->m_len = 0; + error = ECONNABORTED; splx(s); return (error); } |