about summary refs log tree commit diff
path: root/ldso
diff options
context:
space:
mode:
authorRich Felker <dalias@aerifal.cx>2018-07-14 20:20:19 -0400
committerRich Felker <dalias@aerifal.cx>2018-07-14 20:57:24 -0400
commit187bcc3bf40bf187c5d76d206b04028fa8ca403b (patch)
treebb1420a891d816d56f33bfe54c38ecccb3b9397a /ldso
parent9cad27a3dc1a4eb349b6591e4dc8cc89dce32277 (diff)
downloadmusl-187bcc3bf40bf187c5d76d206b04028fa8ca403b.tar.gz
musl-187bcc3bf40bf187c5d76d206b04028fa8ca403b.tar.xz
musl-187bcc3bf40bf187c5d76d206b04028fa8ca403b.zip
implement getaddrinfo's AI_ADDRCONFIG flag
this flag is notoriously under-/mis-specified, and in the past it was
implemented as a nop, essentially considering the absence of a
loopback interface with 127.0.0.1 and ::1 addresses an unsupported
configuration. however, common real-world container environments omit
IPv6 support (even for the network-namespaced loopback interface), and
some kernels omit IPv6 support entirely. future systems on the other
hand might omit IPv4 entirely.

treat these as supported configurations and suppress results of the
unconfigured/unsupported address families when AI_ADDRCONFIG is
requested. use routability of the loopback address to make the
determination; unlike other implementations, we do not exclude
loopback from the "an address is configured" condition, since there is
no basis in the specification for such exclusion. obtaining a result
with AI_ADDRCONFIG does not imply routability of the result, and
applications must still be able to cope with unroutable results even
if they pass AI_ADDRCONFIG.
Diffstat (limited to 'ldso')
0 files changed, 0 insertions, 0 deletions