Sujet : Re: Anybody Using IPv6?
De : invalid (at) *nospam* invalid.invalid (Richard Kettlewell)
Groupes : comp.os.linux.miscDate : 21. May 2025, 17:35:01
Autres entêtes
Organisation : terraraq NNTP server
Message-ID : <wwv5xhtj51m.fsf@LkoBDZeT.terraraq.uk>
References : 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
User-Agent : Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux)
Marc Haber <mh+
usenetspam1118@zugschl.us> writes:
We are talking about how a system with both IPv4 and IPv6 enabled
behaves on an IPv4-only network. Such a system will not have IPv6
routes going further than the automatically established link-local
networks and thus any attempts to use IPv6 will immediately result in
the network stack returning a "no route to host" error message.
>
A well behaved application is then expected to try the next IP address
it might know for the desired communications partner. This applies to
both IPv4 and IPv6. Sadly I don't know at the moment whether this
functionality is implemented in the network stack of whether the
application is expected to implement the necessary logic.
Destination addresses are selected in userland. getaddrinfo() is the
standard implementation, returning an ordered list of destination
addresses corresponding to the requested name. The application is
expected to work through them in order.
Source addresses are normally selected by the kernel (though an
application can do this if it so chooses). But source selection is not
very relevant to choosing between protocols.
The suggested gai.conf change will, by the way, also only hit at this
stage, just pulling IPv4 in front of IPv6. Most IPv6 averse people who
are looking for reasons to disable it say that it slows down DNS, and
even IF they're right, the gai.conf change doesnt affect this part of
commnunication.
>
When I am talking about gai.conf here, I actually mean the in-kernel
address label table that is maintained by virtue of the ip addrlabel
command. Most modern Linux distributions only have gai.conf as kind of
a legacy interface that is not necessarily connected at all to the
in-kernel table that the kernel actually uses. I don't know if and
which distributions have code that reads gai.conf and uses the
contents to initialize the in-kernel table at startup time, since my
systems directly interface with ip addrlabel (often via
systemd-networkd).
AFAICS for destination address selection getaddrinfo() follows gai.conf
(and ignores ip-addrlabel). So I think you have conflated source and
destination address selection here.
-- https://www.greenend.org.uk/rjk/