Date: Sat, 23 Jan 2016 21:04:35 +0000 (UTC) From: Garrett Cooper <ngie@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r294641 - in stable/10/tools/regression/sockets: rtsocket unix_socket Message-ID: <201601232104.u0NL4ZcW057386@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: ngie Date: Sat Jan 23 21:04:34 2016 New Revision: 294641 URL: https://svnweb.freebsd.org/changeset/base/294641 Log: 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) Modified: stable/10/tools/regression/sockets/rtsocket/rtsocket.c stable/10/tools/regression/sockets/unix_socket/unix_socket.c Directory Properties: stable/10/ (props changed) Modified: stable/10/tools/regression/sockets/rtsocket/rtsocket.c ============================================================================== --- stable/10/tools/regression/sockets/rtsocket/rtsocket.c Sat Jan 23 20:51:57 2016 (r294640) +++ stable/10/tools/regression/sockets/rtsocket/rtsocket.c Sat Jan 23 21:04:34 2016 (r294641) @@ -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) { Modified: stable/10/tools/regression/sockets/unix_socket/unix_socket.c ============================================================================== --- stable/10/tools/regression/sockets/unix_socket/unix_socket.c Sat Jan 23 20:51:57 2016 (r294640) +++ stable/10/tools/regression/sockets/unix_socket/unix_socket.c Sat Jan 23 21:04:34 2016 (r294641) @@ -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)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201601232104.u0NL4ZcW057386>