diff options
author | rl1987 <rl1987@sdf.lonestar.org> | 2016-01-03 15:35:45 +0100 |
---|---|---|
committer | rl1987 <rl1987@sdf.lonestar.org> | 2016-01-03 15:35:45 +0100 |
commit | 44497e9ebc5231dcdb6a392093f85990fe13542e (patch) | |
tree | ef5dbb11e3d66aab52c4ea386aa47a751258d180 /src/test | |
parent | cdbb04be102969bd2cece9daf42896e061cc8880 (diff) | |
download | tor-44497e9ebc5231dcdb6a392093f85990fe13542e.tar.gz tor-44497e9ebc5231dcdb6a392093f85990fe13542e.zip |
Add family argument to get_interface_addresses_raw (and subfunctions).
Diffstat (limited to 'src/test')
-rw-r--r-- | src/test/test_address.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/test/test_address.c b/src/test/test_address.c index 9f3d81c92c..3ddf2476e3 100644 --- a/src/test/test_address.c +++ b/src/test/test_address.c @@ -220,7 +220,7 @@ test_address_ifaddrs_to_smartlist(void *arg) ifa_ipv6->ifa_dstaddr = NULL; ifa_ipv6->ifa_data = NULL; - smartlist = ifaddrs_to_smartlist(ifa); + smartlist = ifaddrs_to_smartlist(ifa, AF_UNSPEC); tt_assert(smartlist); tt_assert(smartlist_len(smartlist) == 3); @@ -281,7 +281,7 @@ test_address_get_if_addrs_ifaddrs(void *arg) (void)arg; - results = get_interface_addresses_ifaddrs(LOG_ERR); + results = get_interface_addresses_ifaddrs(LOG_ERR, AF_UNSPEC); tt_assert(results); /* Some FreeBSD jails don't have localhost IP address. Instead, they only @@ -314,7 +314,7 @@ test_address_get_if_addrs_win32(void *arg) (void)arg; - results = get_interface_addresses_win32(LOG_ERR); + results = get_interface_addresses_win32(LOG_ERR, AF_UNSPEC); tt_int_op(smartlist_len(results),>=,1); tt_assert(smartlist_contains_localhost_tor_addr(results)); @@ -511,7 +511,7 @@ test_address_get_if_addrs_ioctl(void *arg) (void)arg; - result = get_interface_addresses_ioctl(LOG_ERR); + result = get_interface_addresses_ioctl(LOG_ERR, AF_INET); /* On an IPv6-only system, this will fail and return NULL tt_assert(result); @@ -845,9 +845,10 @@ test_address_get_if_addrs6_list_no_internal(void *arg) static int called_get_interface_addresses_raw = 0; static smartlist_t * -mock_get_interface_addresses_raw_fail(int severity) +mock_get_interface_addresses_raw_fail(int severity, sa_family_t family) { (void)severity; + (void)family; called_get_interface_addresses_raw++; return smartlist_new(); |