From 086dfe93472525fd6ca8a2800e1608ffa1e2dd59 Mon Sep 17 00:00:00 2001 From: Maxim Sharabayko Date: Fri, 29 Jul 2022 16:03:37 +0200 Subject: [PATCH] [tests] Fixed TestIPv6.v6_calls_v4 in case the system-default IPV6_V6ONLY is 1. --- test/test_ipv6.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/test/test_ipv6.cpp b/test/test_ipv6.cpp index b7e2379bf..4dd235e06 100644 --- a/test/test_ipv6.cpp +++ b/test/test_ipv6.cpp @@ -31,6 +31,8 @@ class TestIPv6 m_caller_sock = srt_create_socket(); ASSERT_NE(m_caller_sock, SRT_ERROR); + // IPv6 calling IPv4 would otherwise fail if the system-default net.ipv6.bindv6only=1. + ASSERT_NE(srt_setsockflag(m_caller_sock, SRTO_IPV6ONLY, &no, sizeof no), SRT_ERROR); m_listener_sock = srt_create_socket(); ASSERT_NE(m_listener_sock, SRT_ERROR);