]> www.infradead.org Git - users/dwmw2/openconnect.git/commit
Allow tests to run over IPv6 as well as Legacy IP
authorDavid Woodhouse <dwmw2@infradead.org>
Fri, 5 Apr 2024 16:23:22 +0000 (17:23 +0100)
committerDavid Woodhouse <dwmw2@infradead.org>
Tue, 7 Jan 2025 12:17:08 +0000 (12:17 +0000)
commit76b5a2fd4f513b6dd110e561e562faff36bb6ced
tree32600dd708c08b485f22704b89896fdd5cdb6bc7
parent78bcbe0ace77b584ccf3d85dfec4f3ad8076d429
Allow tests to run over IPv6 as well as Legacy IP

When run in an environment with no Legacy IP addresses, or no IPv6 addresses,
AI_ADDRCONFIG will cause getaddrinfo() not to return addresses of that type.

So when running in an IPv6-only environment, ocserv doesn't listen on Legacy
IP. And thus the tests fail. Fix this by using a hostname 'sockwrap' for the
test connections, and providing '--resolve' arguments for both the Legacy IP
and IPv6 addresses handled by libsocket_wrapper.

Some of the python test servers which don't use AI_ADDRCONFIG do still work
on Legacy IP, so leave those alone for now.

We recently added '-4' to the socat invocation for the nullppp tests, for
similar reasons (becaose socat started listening on IPv6 by default). We
can remove that now too.

Closes #721

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
13 files changed:
tests/auth-certificate
tests/auth-hwtpm
tests/auth-multicert
tests/auth-nonascii
tests/auth-pkcs11
tests/auth-swtpm
tests/auth-username-pass
tests/cert-fingerprint
tests/common.sh
tests/id-test
tests/obsolete-server-crypto
tests/pfs
tests/ppp-over-tls