Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix healthcheck failing in dual stack network when resolving hostname #231

Merged
merged 2 commits into from
Aug 30, 2023
Merged

Conversation

CerebralXor
Copy link
Contributor

In dual stack networks, getent may return an IPv6 address when resolving a hostname, causing healthchecks to fail in the is_tcp_connection_established() function. This change ensures that the IP address returned by getent in the get_ip() function is an IPv4 address, and if not then try resolving the hostname with s6-dnsipv4 instead.

In dual stack networks, `getent` may return an ipv6 address when resolving a hostname, causing healthchecks to fail in the `is_tcp_connection_established()` function.
This change ensure ip returned by `getent` in `get_ip()` function is a ipv4 address, if not, then try resolving hostname with `s6-dnsipv4` instead.
@fredclausen fredclausen merged commit 8ffe715 into sdr-enthusiasts:main Aug 30, 2023
2 checks passed
@fredclausen
Copy link
Member

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants