platform_bionic/libc/netbsd/net
Steinar H. Gunderson 9ab75d4cc8 Implement support for RFC 3484 (address selection/sorting) in bionic. (The
Java changes required not to mess up the ordering from bionic will arrive in a
later commit.) In particular, this will give us more correct behavior when on a
6to4 network, in that IPv4 will usually be preferred over 6to4.

Most of RFC 3484 is implemented -- what's not is rule 3 (avoid deprecated
addresses), 4 (prefer home addresses) and 7 (prefer native transport) as they
require low-level access to the kernel routing table via netlink. (glibc also
started out this way, and these rules are primarily useful in pretty obscure
circumstances, so we should be fine for the time being.)

Also, rule 9 (use longest matching prefix) has been modified so it does not try
to sort IPv4 addresses; given current IPv4 addressing practice these rules are
pretty much meaningless. Finally, I've added support for Teredo as a separate
label, with slightly lower preference than 6to4. (Vista puts the preference
below IPv4 by default. glibc puts the preference together with non-tunneled
IPv6.)

Note that this patch removes support for the "sortlist" directive in
resolv.conf; I've never seen it in actual use, it's irrelevant for Android
(since we don't use resolv.conf anyway), and it's not clear how it would be
implemented alongside RFC 3484.
2010-02-24 11:49:17 +01:00
..
base64.c auto import from //depot/cupcake/@135843 2009-03-03 19:28:35 -08:00
getaddrinfo.c Implement support for RFC 3484 (address selection/sorting) in bionic. (The 2010-02-24 11:49:17 +01:00
getnameinfo.c auto import from //depot/cupcake/@135843 2009-03-03 19:28:35 -08:00
getservbyname.c auto import from //depot/cupcake/@135843 2009-03-03 19:28:35 -08:00
getservbyname_r.c auto import from //depot/cupcake/@135843 2009-03-03 19:28:35 -08:00
getservbyport.c auto import from //depot/cupcake/@135843 2009-03-03 19:28:35 -08:00
getservbyport_r.c auto import from //depot/cupcake/@135843 2009-03-03 19:28:35 -08:00
getservent.c Include <endian.h> instead of <sys/endian.h>, 2009-08-31 15:42:09 +08:00
getservent_r.c auto import from //depot/cupcake/@135843 2009-03-03 19:28:35 -08:00
nsdispatch.c auto import from //depot/cupcake/@135843 2009-03-03 19:28:35 -08:00
reentrant.h auto import from //depot/cupcake/@135843 2009-03-03 19:28:35 -08:00
servent.h auto import from //depot/cupcake/@135843 2009-03-03 19:28:35 -08:00
services.h auto import from //depot/cupcake/@135843 2009-03-03 19:28:35 -08:00