diff options
author | Rich Felker <dalias@aerifal.cx> | 2018-09-19 18:03:22 -0400 |
---|---|---|
committer | Rich Felker <dalias@aerifal.cx> | 2018-09-19 18:03:22 -0400 |
commit | f381c118b2d4f7d914481d3cdc830ce41369b002 (patch) | |
tree | 2e0390caf1f9020eef4bad24ef06a47952cd37ec /src/network/res_send.c | |
parent | dffc20591873ede1ec4b30634fc91ba3daa372eb (diff) | |
download | musl-f381c118b2d4f7d914481d3cdc830ce41369b002.tar.gz musl-f381c118b2d4f7d914481d3cdc830ce41369b002.tar.xz musl-f381c118b2d4f7d914481d3cdc830ce41369b002.zip |
fix getaddrinfo regression with AI_ADDRCONFIG on some configurations
despite not being documented to do so in the standard or Linux documentation, attempts to udp connect to 127.0.0.1 or ::1 generate EADDRNOTAVAIL when the loopback device is not configured and there is no default route for IPv6. this caused getaddrinfo with AI_ADDRCONFIG to fail with EAI_SYSTEM and EADDRNOTAVAIL on some no-IPv6 configurations, rather than the intended behavior of detecting IPv6 as unsuppported and producing IPv4-only results. previously, only EAFNOSUPPORT was treated as unavailability of the address family being probed. instead, treat all errors related to inability to get an address or route as conclusive that the family being probed is unsupported, and only fail with EAI_SYSTEM on other errors. further improvements may be desirable, such as reporting EAI_AGAIN instead of EAI_SYSTEM for errors which are expected to be transient, but this patch should suffice to fix the serious regression.
Diffstat (limited to 'src/network/res_send.c')
0 files changed, 0 insertions, 0 deletions