summaryrefslogtreecommitdiff
path: root/pflocal
diff options
context:
space:
mode:
authorPino Toscano <toscano.pino@tiscali.it>2011-12-06 00:30:30 +0100
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2011-12-06 01:25:15 +0100
commit0fb997733a0bb4e3f7a0c073c19a2e302be1fbae (patch)
tree0c83ad9daa089a7957e08a8f25c9d7c87041ecfc /pflocal
parenta552d956e86682b4af80c8fa5e6cc48282fd5a28 (diff)
Fix error values on socket creation
On socket creation, return the correct errno values, EPROTOTYPE and EPROTONOSUPPORT, for invalid socket types and protocols. * pfinet/socket-ops.c (S_socket_create): Correctly return EPROTOTYPE and EPROTONOSUPPORT. * pflocal/pf.c (S_socket_create): Correctly return EPROTOTYPE.
Diffstat (limited to 'pflocal')
-rw-r--r--pflocal/pf.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/pflocal/pf.c b/pflocal/pf.c
index 32c12e17..55824d41 100644
--- a/pflocal/pf.c
+++ b/pflocal/pf.c
@@ -65,7 +65,7 @@ S_socket_create (mach_port_t pf,
case SOCK_SEQPACKET:
pipe_class = seqpack_pipe_class; break;
default:
- return ESOCKTNOSUPPORT;
+ return EPROTOTYPE;
}
err = sock_create (pipe_class, mode, &sock);