diff options
author | Jun-ichiro itojun Hagino <itojun@cvs.openbsd.org> | 2001-02-07 12:20:43 +0000 |
---|---|---|
committer | Jun-ichiro itojun Hagino <itojun@cvs.openbsd.org> | 2001-02-07 12:20:43 +0000 |
commit | af426c9141fb1a9729304c18cf3ff21b31ce429a (patch) | |
tree | b7dde520dce1881bcf7add6dbaa0fb236b008e80 | |
parent | dd09e67191bcfbbd2de5272b1bde0980325505a3 (diff) |
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); } |