diff --git a/test/fmt.c b/test/fmt.c index 6eb9ef807..7b82deebb 100644 --- a/test/fmt.c +++ b/test/fmt.c @@ -622,10 +622,8 @@ int test_fmt_snprintf(void) const uint8_t v[] = {0xfa, 0xce, 0xb0, 0x0c}; struct sa sa4; const char addr4[] = "1.2.3.4"; -#ifdef HAVE_INET6 struct sa sa6; const char addr6[] = "2001:5c0:8fff:ffff::d"; -#endif char buf[128], sbuf[8]; int n, err; @@ -646,26 +644,22 @@ int test_fmt_snprintf(void) DEBUG_WARNING("sa_set_str4: %m\n", err); goto out; } -#ifdef HAVE_INET6 err = sa_set_str(&sa6, addr6, 0); if (err) { DEBUG_WARNING("sa_set_str6: %m\n", err); goto out; } -#endif (void)re_snprintf(buf, sizeof(buf), "%j", &sa4); if (0 != strcmp(buf, addr4)) { err = EINVAL; goto out; } -#ifdef HAVE_INET6 (void)re_snprintf(buf, sizeof(buf), "%j", &sa6); if (0 != strcmp(buf, addr6)) { err = EINVAL; goto out; } -#endif /* Overflow */ n = re_snprintf(buf, 3, "12"); diff --git a/test/ice.c b/test/ice.c index df73ec9ec..078edff30 100644 --- a/test/ice.c +++ b/test/ice.c @@ -855,12 +855,10 @@ static const char *testv[] = { "6 1 TCP 1692401663 192.0.2.3 45687 typ srflx raddr" " 10.0.1.1 rport 8999 tcptype so", -#ifdef HAVE_INET6 "H76f0ae12 1 UDP 2130706431 fda8:de2d:e95f:4811::1 6054 typ host", "3113280040 1 UDP 2122255103 2001:aaaa:5ef5:79fb:1847:2c0d:a230:23ab 53329" " typ host", -#endif }; diff --git a/test/sa.c b/test/sa.c index 5b2ea8037..8af178b6a 100644 --- a/test/sa.c +++ b/test/sa.c @@ -44,7 +44,6 @@ int test_sa_cmp(void) "1.2.3.4", 12344, false }, -#ifdef HAVE_INET6 { "0:0:0:0:0:0:0:0", 123, "::", 123, @@ -90,7 +89,6 @@ int test_sa_cmp(void) "fe80:0000:0000:0000:1215:58ff:fe2d:90ab", 3333, false }, -#endif }; size_t i; int err = 0; @@ -133,12 +131,10 @@ int test_sa_decode(void) {0, AF_INET, "1.2.3.4:0", "1.2.3.4", 0}, {EINVAL, AF_INET, "1.2.3.4", "", 0}, {EINVAL, AF_INET, "1.2.3.4.:1234", "", 0}, -#ifdef HAVE_INET6 {0, AF_INET6, "[::1]:1", "::1", 1}, {0, AF_INET6, "[fe80::215:58ff:fe2d:90ab]:3333", "fe80::215:58ff:fe2d:90ab", 3333}, {EINVAL, AF_INET6, "[::1]", "", 0}, -#endif }; uint32_t i; int err = 0; @@ -204,12 +200,10 @@ int test_sa_class(void) {true, false, false, "127.0.0.1"}, {true, false, false, "127.3.0.3"}, {false, true, false, "169.254.1.2"}, -#ifdef HAVE_INET6 {false, false, true, "::"}, {true, false, false, "::1"}, {false, true, false, "fe80::215:58ff:fe2d:90ab"}, {false, false, false, "2610:a0:c779:b::d1ad:35b4"} -#endif }; uint32_t i; int err = 0; @@ -279,11 +273,9 @@ int test_sa_ntop(void) {AF_INET, "0.0.0.0"}, {AF_INET, "1.2.3.4"}, {AF_INET, "255.254.253.128"}, -#ifdef HAVE_INET6 {AF_INET6, "::1"}, {AF_INET6, "fe80::215:58ff:fe2d:90ab"}, {AF_INET6, "2610:a0:c779:b::d1ad:35b4"} -#endif }; uint32_t i; int err = 0; diff --git a/test/sip.c b/test/sip.c index 1808a973c..2e6b8646e 100644 --- a/test/sip.c +++ b/test/sip.c @@ -86,11 +86,9 @@ int test_sip_addr(void) "\"Agmund Bolt\" " ";tag=foo123;bar=9d7j3", -#ifdef HAVE_INET6 /* RFC 5118 - SIP Torture Test Messages for IPv6 */ "\"Caller\" ", "\"Caller\" ", -#endif /* gruu */ "\"hei\" " @@ -165,11 +163,9 @@ int test_sip_via(void) {SIP_TRANSP_UDP, "1.2.3.4", 1234, "z9ghkdkasd"}, {SIP_TRANSP_TCP, "123.123.123.123", 0, "b0ajsd01abcdef918"}, {SIP_TRANSP_TCP, "myhost.com", 0, "b0ajsd01ab2838475"}, -#ifdef HAVE_INET6 {SIP_TRANSP_TCP, "fe80::215:58ff:fe2d:90ab", 5060, "b0ajs01cde38475"}, {SIP_TRANSP_TLS, "fe80::215:58ff:fe2d:90ab", 0, "47daasd5"} -#endif }; struct sip_msg *msg = NULL; struct mbuf *mb; @@ -198,11 +194,9 @@ int test_sip_via(void) ipaddr = !sa_set_str(&addr, testv[i].host, testv[i].port); -#ifdef HAVE_INET6 if (ipaddr && AF_INET6 == sa_af(&addr)) err = mbuf_printf(mb, "[%s]", testv[i].host); else -#endif err = mbuf_printf(mb, "%s", testv[i].host); if (err) goto out; diff --git a/test/stun.c b/test/stun.c index 378231189..903767c13 100644 --- a/test/stun.c +++ b/test/stun.c @@ -57,7 +57,6 @@ static const unsigned char respv4[] = "\x80\x28\x00\x04" "\xc0\x7d\x4c\x96"; -#ifdef HAVE_INET6 static const unsigned char respv6[] = "\x01\x01\x00\x48" "\x21\x12\xa4\x42" @@ -73,7 +72,6 @@ static const unsigned char respv6[] = "\x82\x92\xc2\x75\xbf\xe3\xed\x41" "\x80\x28\x00\x04" "\xc8\xfb\x0b\x4c"; -#endif static const uint32_t ice_prio = 0x6e0001ff; @@ -242,7 +240,6 @@ int test_stun_resp(void) if (err) return err; -#ifdef HAVE_INET6 resp.p = (char *)respv6; resp.l = sizeof(respv6) - 1; err = sa_set_str(&maddr, "2001:db8:1234:5678:11:2233:4455:6677", @@ -250,7 +247,6 @@ int test_stun_resp(void) if (err) return err; err = test_resp(&resp, &maddr); -#endif return err; } diff --git a/test/uri.c b/test/uri.c index 83c4785c4..ccf93d952 100644 --- a/test/uri.c +++ b/test/uri.c @@ -37,7 +37,6 @@ int test_uri(void) "sip:atlanta.com;method=REGISTER?to=alice%40atlanta.com", "sip:alice;day=tuesday@atlanta.com", -#ifdef HAVE_INET6 /* IPv6 */ "sip:[::1];transport=udp", "sip:[::1]:1234;transport=udp", @@ -53,7 +52,6 @@ int test_uri(void) "sip:[2001:db8::10:5070]", "sip:[2001:db8::10]:5070", "sip:user@[2001:db8::10]", -#endif }; struct uri uri; struct mbuf mb; @@ -124,7 +122,6 @@ int test_uri_encode(void) PL("")}, "sip:user:pass@host:443/wss/;transport=wss" }, -#ifdef HAVE_INET6 {{PL("sip"), PL("user"), PL(""), @@ -135,7 +132,6 @@ int test_uri_encode(void) PL("")}, "sip:user@[::1]:1234;transport=udp" } -#endif }; struct mbuf mb; int err = EINVAL;