svn commit: r311588 - stable/11/contrib/netbsd-tests/lib/libc/sys
Ngie Cooper
ngie at FreeBSD.org
Sat Jan 7 08:24:51 UTC 2017
Author: ngie
Date: Sat Jan 7 08:24:49 2017
New Revision: 311588
URL: https://svnweb.freebsd.org/changeset/base/311588
Log:
MFC r311242:
listen_low_port: check for errors from socket(2) before continuing
CID: 976778
Modified:
stable/11/contrib/netbsd-tests/lib/libc/sys/t_listen.c
Directory Properties:
stable/11/ (props changed)
Modified: stable/11/contrib/netbsd-tests/lib/libc/sys/t_listen.c
==============================================================================
--- stable/11/contrib/netbsd-tests/lib/libc/sys/t_listen.c Sat Jan 7 08:18:25 2017 (r311587)
+++ stable/11/contrib/netbsd-tests/lib/libc/sys/t_listen.c Sat Jan 7 08:24:49 2017 (r311588)
@@ -110,6 +110,9 @@ ATF_TC_BODY(listen_low_port, tc)
int sd, val;
sd = socket(AF_INET, SOCK_STREAM, 0);
+#ifdef __FreeBSD__
+ ATF_REQUIRE_MSG(sd != -1, "socket failed: %s", strerror(errno));
+#endif
val = IP_PORTRANGE_LOW;
if (setsockopt(sd, IPPROTO_IP, IP_PORTRANGE, &val,
More information about the svn-src-stable
mailing list