summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorngie <ngie@FreeBSD.org>2016-01-23 21:04:34 +0000
committerngie <ngie@FreeBSD.org>2016-01-23 21:04:34 +0000
commite184c2b973ad8303f9ea562d709449847000c41e (patch)
treebea4f7885c9484ff94015130b7ed96fad3539939 /tools
parentdab5810197d121819a52c51d5d2db44e161b674d (diff)
downloadFreeBSD-src-e184c2b973ad8303f9ea562d709449847000c41e.zip
FreeBSD-src-e184c2b973ad8303f9ea562d709449847000c41e.tar.gz
MFC r294125:
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)
Diffstat (limited to 'tools')
-rw-r--r--tools/regression/sockets/rtsocket/rtsocket.c8
-rw-r--r--tools/regression/sockets/unix_socket/unix_socket.c2
2 files changed, 5 insertions, 5 deletions
diff --git a/tools/regression/sockets/rtsocket/rtsocket.c b/tools/regression/sockets/rtsocket/rtsocket.c
index b5824b3..f189cdc 100644
--- a/tools/regression/sockets/rtsocket/rtsocket.c
+++ b/tools/regression/sockets/rtsocket/rtsocket.c
@@ -52,7 +52,7 @@ main(void)
sock);
}
- if (errno != EPROTONOSUPPORT)
+ if (errno != EPROTOTYPE)
err(-1, "socket(PF_ROUTE, SOCK_STREAM, 0)");
sock = socket(PF_ROUTE, SOCK_DGRAM, 0);
@@ -62,7 +62,7 @@ main(void)
sock);
}
- if (errno != EPROTONOSUPPORT)
+ if (errno != EPROTOTYPE)
err(-1, "socket(PF_ROUTE, SOCK_DGRAM, 0)");
sock = socket(PF_ROUTE, SOCK_RAW, 0);
@@ -77,7 +77,7 @@ main(void)
"socketpair(PF_ROUTE, SOCK_STREAM, 0, socks) success");
}
- if (errno != EPROTONOSUPPORT)
+ if (errno != EPROTOTYPE)
err(-1, "socketpair(PF_ROUTE, SOCK_STREAM, 0, socks)");
if (socketpair(PF_ROUTE, SOCK_DGRAM, 0, socks) == 0) {
@@ -87,7 +87,7 @@ main(void)
"socketpair(PF_ROUTE, SOCK_DGRAM, 0, socks) success");
}
- if (errno != EPROTONOSUPPORT)
+ if (errno != EPROTOTYPE)
err(-1, "socketpair(PF_ROUTE, SOCK_DGRAM, 0, socks)");
if (socketpair(PF_ROUTE, SOCK_RAW, 0, socks) == 0) {
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)
OpenPOWER on IntegriCloud