Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
write_prometheus: don't use AI_ADDRCONFIG for resolving bind address
Fixes #4150 write_prometheus uses getaddrinfo to resolve the bind address. The AI_ADDRCONFIG flag causes getaddrinfo to refuse to resolve 0.0.0.0 when the system has no non-loopback IPv4 addresses configured and refuse to resolve :: when the system has no non-loopback IPv6 configured. We want binding to a wildcard address (0.0.0.0 or ::) to always work, even if the network is down. To achieve that, don't pass the AI_ADDRCONFIG flag when resolving a bind address.
- Loading branch information