]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Make the FreeBSD ersatz_socketpair test even more skippable.
authorNick Mathewson <nickm@torproject.org>
Fri, 14 Oct 2016 13:14:07 +0000 (09:14 -0400)
committerNick Mathewson <nickm@torproject.org>
Fri, 14 Oct 2016 13:14:07 +0000 (09:14 -0400)
(This is safe, since only windows actually -uses- erstaz_socketpair.)

src/test/test_util.c

index 6bcd0b5109af0f241d089d48583b1e11aa1f62a5..a548b2a100e4d7a65bcd05cc3e0e714882663807 100644 (file)
@@ -5128,7 +5128,7 @@ test_util_socket(void *arg)
     tor_close_socket__real(fd4);
 }
 
-#ifdef __FreeBSD__
+#if 0
 static int
 is_there_a_localhost(int family)
 {
@@ -5180,7 +5180,7 @@ test_util_socketpair(void *arg)
    * Otherwise, we risk exposing a socketpair on a routable IP address. (Some
    * BSD jails use a routable address for localhost. Fortunately, they have
    * the real AF_UNIX socketpair.) */
-  if (ersatz && socketpair_result < 0 && !is_there_a_localhost(AF_INET)) {
+  if (ersatz && socketpair_result < 0) {
     /* In my testing, an IPv6-only FreeBSD jail without ::1 returned EINVAL.
      * Assume we're on a machine without 127.0.0.1 or ::1 and give up now. */
     tt_skip();