]> git.ipfire.org Git - thirdparty/tor.git/commit
Fix unit tests on systems without IPv4 or localhost addresses
authorteor (Tim Wilson-Brown) <teor2345@gmail.com>
Wed, 18 Nov 2015 12:25:21 +0000 (23:25 +1100)
committerteor (Tim Wilson-Brown) <teor2345@gmail.com>
Wed, 18 Nov 2015 12:25:21 +0000 (23:25 +1100)
commit86eba14ac5495cb031669b7e495d5e85653535f2
treebbc195016f91d4afc8b66b7e4a2fc259ef20b74a
parent7a940fac1c7f0ff81f58ed26350fed57e26b2642
Fix unit tests on systems without IPv4 or localhost addresses

Make unit tests pass on IPv6-only systems, and systems without
localhost addresses (like some FreeBSD jails).

Fixes:
* get_if_addrs_ifaddrs: systems without localhost
* get_if_addrs_ioctl: only works on IPv4 systems
* socket: check IPv4 and IPv6, skip on EPROTONOSUPPORT
* socketpair_ersatz: uses IPv4, skip on EPROTONOSUPPORT

Fixes bug #17632; bugfix on unit tests in 0.2.7.3-rc.
c464a367728d was a partial fix for this issue in #17255;
it was released in unit tests in 0.2.7.4-rc.

Patch by "teor".
changes/bug17632-no-ipv4-no-localhost [new file with mode: 0644]
src/test/test_address.c
src/test/test_util.c