[PATCH 1/4] tests: Fix virnetsockettest on FreeBSD

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



FreeBSD doesn't let IPv4 clients to connect to IPv6 sockets,
so one of our test cases has to be compiled out there.

Signed-off-by: Andrea Bolognani <abologna@xxxxxxxxxx>
---
 tests/virnetsockettest.c | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/tests/virnetsockettest.c b/tests/virnetsockettest.c
index 9f9a243484..d39481067e 100644
--- a/tests/virnetsockettest.c
+++ b/tests/virnetsockettest.c
@@ -470,9 +470,19 @@ mymain(void)
         if (virTestRun("Socket TCP/IPv4+IPv6 Accept", testSocketTCPAccept, &tcpData) < 0)
             ret = -1;
 
+        /* From FreeBSD's inet6(4):
+         *
+         *   By default, FreeBSD does not route IPv4 traffic to AF_INET6
+         *   sockets.  The default behavior intentionally violates RFC2553
+         *   for security reasons.  Listen to two sockets if you want to
+         *   accept both IPv4 and IPv6 traffic.
+         *
+         * So this test will never work on FreeBSD, and need to skip it. */
+# ifndef __FreeBSD__
         tcpData.cnode = "::1";
         if (virTestRun("Socket TCP/IPv4+IPv6 Accept", testSocketTCPAccept, &tcpData) < 0)
             ret = -1;
+# endif /* __FreeBSD__ */
     }
 #endif
 
-- 
2.14.3

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux