[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [tor/master] Merge branch 'maint-0.2.7'
commit 4cd93a6a59236519dee2a1a7ee824904e923189d
Merge: a5bed4d 7d1fe7c
Author: Nick Mathewson <nickm@xxxxxxxxxxxxxx>
Date: Mon Feb 1 09:41:45 2016 -0500
Merge branch 'maint-0.2.7'
(We already had a fix for the address test freebsd issues)
src/test/test_address.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --cc src/test/test_address.c
index 3ddf247,4cf3a5a..3b17b23
--- a/src/test/test_address.c
+++ b/src/test/test_address.c
@@@ -511,28 -481,16 +511,28 @@@ test_address_get_if_addrs_ioctl(void *a
(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);
- tt_int_op(smartlist_len(result),>=,1);
+ */
-#ifndef __FreeBSD__
- /* FreeBSD doesn't have a localhost in jails sometimes. */
- tt_assert(smartlist_contains_localhost_tor_addr(result));
-#endif
- done:
+ /* Some FreeBSD jails don't have localhost IP address. Instead, they only
+ * have the address assigned to the jail (whatever that may be).
+ * And a jail without a network connection might not have any addresses at
+ * all. */
+ if (result) {
+ tt_assert(!smartlist_contains_null_tor_addr(result));
+
+ /* If there are addresses, they must be IPv4 or IPv6.
+ * (AIX supports IPv6 from SIOCGIFCONF.) */
+ if (smartlist_len(result) > 0) {
+ tt_assert(smartlist_contains_ipv4_tor_addr(result)
+ || smartlist_contains_ipv6_tor_addr(result));
+ }
+ }
+
- done:
++ done:
if (result) {
SMARTLIST_FOREACH(result, tor_addr_t *, t, tor_free(t));
smartlist_free(result);
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits