From 5df472ad9d7d2cf0556947a98ab052f4a098b40d Mon Sep 17 00:00:00 2001 From: ngie Date: Sat, 16 Jan 2016 02:02:50 +0000 Subject: Test for EPROTOTYPE not EPROTONOSUPPORT - `SOCK_RAW` is the implied supported type parameter for socket(2) per route(4) - localsw in `sys/kern/uipc_usrreq.c` doesn't have an entry for `SOCK_RAW`, so the prototype is invalid (this isn't explicitly documented anywhere I could find) MFC after: 1 week Sponsored by: EMC / Isilon Storage Division --- tools/regression/sockets/unix_socket/unix_socket.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tools/regression/sockets/unix_socket/unix_socket.c') diff --git a/tools/regression/sockets/unix_socket/unix_socket.c b/tools/regression/sockets/unix_socket/unix_socket.c index 085366f..ca7225b 100644 --- a/tools/regression/sockets/unix_socket/unix_socket.c +++ b/tools/regression/sockets/unix_socket/unix_socket.c @@ -59,7 +59,7 @@ main(void) close(sock); errx(-1, "socket(PF_LOCAL, SOCK_RAW, 0) returned %d", sock); } - if (errno != EPROTONOSUPPORT) + if (errno != EPROTOTYPE) err(-1, "socket(PF_LOCAL, SOCK_RAW, 0)"); if (socketpair(PF_LOCAL, SOCK_STREAM, 0, socks) < 0) -- cgit v1.1