diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2005-09-10 19:13:33 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2005-09-10 19:13:33 +0000 |
commit | f4bbb644674dc7d95f02d6516e04d46f012a32a3 (patch) | |
tree | 9761977c32ddbe9c049f372ea3da32182b6fdeff /sys/kern | |
parent | 693edbe0e7c5367e473dec72469ab3deed4cb376 (diff) |
upon shutdown(), if socket is unconnected return ENOTCONN; ok millert
Diffstat (limited to 'sys/kern')
-rw-r--r-- | sys/kern/uipc_socket.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/kern/uipc_socket.c b/sys/kern/uipc_socket.c index 375f853997e..0c7bd7ab673 100644 --- a/sys/kern/uipc_socket.c +++ b/sys/kern/uipc_socket.c @@ -1,4 +1,4 @@ -/* $OpenBSD: uipc_socket.c,v 1.59 2005/08/11 18:20:10 millert Exp $ */ +/* $OpenBSD: uipc_socket.c,v 1.60 2005/09/10 19:13:32 deraadt Exp $ */ /* $NetBSD: uipc_socket.c,v 1.21 1996/02/04 02:17:52 christos Exp $ */ /* @@ -955,6 +955,8 @@ soshutdown(so, how) { register struct protosw *pr = so->so_proto; + if ((so->so_state & SS_ISCONNECTED) == 0) + return (ENOTCONN); switch (how) { case SHUT_RD: case SHUT_RDWR: |