summaryrefslogtreecommitdiffstats
path: root/libc/netbsd/net/getaddrinfo.c
Commit message (Collapse)AuthorAgeFilesLines
* Merge "Only look up A records if the system has IPv4." into gingerbreadandroid-cts-2.3_r2android-2.3.3_r1aandroid-2.3.3_r1.1android-2.3.3_r1David Turner2011-01-181-29/+59
|\
| * Only look up A records if the system has IPv4.Lorenzo Colitti2011-01-151-29/+59
| | | | | | | | | | | | | | | | | | getaddrinfo only asks DNS for IPv6 addresses if the system has IPv6 connectivity, but always asks for IPv4 addresses. Don't ask for IPv4 addresses if there is no IPv4 connectivity. Change-Id: Iefe9fcb006fabe60b4b11dd4653a7c4a406506f4
* | Backport (simple cherry-pick) d33019030c1f0cddca557f9659e3c471bde0e6a9Steinar H. Gunderson2011-01-141-13/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | to gingerbread. Implement RFC3484 policy table changes from draft-ietf-6man-rfc3484-revise-01. The changes in a nutshell: - Handle v4-mapped as different from v4-compat (this was probably an existing bug in our code). - Add policy entries for ULA, above most everything else. - Put v4-compat, old-style IPv6 site-local and 6bone addresses way down in the preference table. The rest is just shuffling numbers around (no actual changes to priority).
* | Backport (simple cherry-pick) d1624add2b73ce8ff7826ce27b1d6d6e35bb83a6Steinar H. Gunderson2011-01-141-4/+6
|/ | | | | | to gingerbread. Don't treat private IPv4 addresses as being in a non-global scope. The effect of this change is essentially to prefer NATed IPv4 over 6to4.
* Remove compiler warnings when building Bionic.David 'Digit' Turner2010-06-221-10/+17
| | | | | | | | Also add missing declarations to misc. functions. Fix clearerr() implementation (previous was broken). Handle feature test macros like _POSIX_C_SOURCE properly. Change-Id: Icdc973a6b9d550a166fc2545f727ea837fe800c4
* Fix comparison of IPv6 prefixesKenny Root2010-03-241-1/+1
| | | | | | | Typo assigned prefixlen1 twice instead of to the two different variables for comparison and difference computation. Change-Id: I6631b8269ca6aae264c8d7d414127b756838df96
* Implement support for RFC 3484 (address selection/sorting) in bionic. (TheSteinar H. Gunderson2010-02-241-27/+356
| | | | | | | | | | | | | | | | | | | | | | | | 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.
* Don't request IPv6 addresses if AI_ADDRCONFIG is specified and the system ↵Lorenzo Colitti2009-08-041-8/+42
| | | | has no IPv6 connectivity.
* change getaddrinfo() implementation to match GLibc.David 'Digit' Turner2009-05-051-2/+6
| | | | | | | | | | | | | | the issue is that the BSD implementation doesn't accept a call like: getaddrinfo(SERVER_NAME, "9999", NULL, &res); because if will reject a numerical string in the second parameter if no hints are explicitely provided. This technically doesn't violate POSIX but might make porting Linux software a bit difficult. For more details see: http://groups.google.com/group/android-ndk/browse_thread/thread/818ab9c53f24c87 also comment debugging printf() calls which shouldn't be there.
* auto import from //depot/cupcake/@135843The Android Open Source Project2009-03-031-0/+1792
|
* auto import from //depot/cupcake/@135843The Android Open Source Project2009-03-031-1792/+0
|
* Initial Contributionandroid-1.0The Android Open Source Project2008-10-211-0/+1792