mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-12-06 19:41:15 +01:00
Move a check for trailing colon to tor_inet_pton()
That way, string_is_valid_ipv6_address() can benefit from it
This commit is contained in:
@@ -5749,6 +5749,18 @@ test_util_ipv4_validation(void *arg)
|
||||
return;
|
||||
}
|
||||
|
||||
static void
|
||||
test_util_ipv6_validation(void *arg)
|
||||
{
|
||||
(void)arg;
|
||||
|
||||
tt_assert(string_is_valid_ipv6_address("2a00:1450:401b:800::200e"));
|
||||
tt_assert(!string_is_valid_ipv6_address("11:22::33:44:"));
|
||||
|
||||
done:
|
||||
return;
|
||||
}
|
||||
|
||||
static void
|
||||
test_util_writepid(void *arg)
|
||||
{
|
||||
@@ -6439,6 +6451,7 @@ struct testcase_t util_tests[] = {
|
||||
UTIL_TEST(hostname_validation, 0),
|
||||
UTIL_TEST(dest_validation_edgecase, 0),
|
||||
UTIL_TEST(ipv4_validation, 0),
|
||||
UTIL_TEST(ipv6_validation, 0),
|
||||
UTIL_TEST(writepid, 0),
|
||||
UTIL_TEST(get_avail_disk_space, 0),
|
||||
UTIL_TEST(touch_file, 0),
|
||||
|
||||
Reference in New Issue
Block a user