Closed 6f closed 7 years ago
I can't figure out why this was in there at all in the first place, except that early versions (using libcurl) had trouble with IPV6 or something. Fixed--thanks!
A similar problem still exists. I had domains with both ipv4 and ipv6 addresses in dns so only the ipv6 was tried. Unfortunately the ipv6 wasn't responding while the ipv4 was, but acme-client apparently didn't fall back to the ipv4 and thus failed. All worked okay after I removed the ipv6 address from dns, but it took me a while to find the problem.
The DNS resolver only returns at most one address. On my non-ipv6 freebsd system this happens to be a ipv6 address. This causes acme-client to fail as it cannot connect to an ipv6 address:
Strangely enough the code is fully equipped to handle multiple ip addresses, however an early "break" inside the getaddrinfo processing code is causing at most one address to be returned, see https://github.com/kristapsdz/acme-client-portable/blob/master/dnsproc.c#L108
After applying the following patch
The network communication now works as expected: