summaryrefslogtreecommitdiffstats
path: root/libc/netbsd
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-225-14/+25
| | | | | | | | 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
* Fix spurious DNS lookups in the C library.David 'Digit' Turner2010-03-082-3/+5
| | | | | | | | | | | | | | | | | | | | | | | The problem was that the 'defdname' field of res_state structure was not properly initialized in __res_vinit(). This field is used to store the default domain name, which is normally build from calling gethostname() (see line 549 of res_init.c). Unfortunately, in the typical Android case, gethostname() returns an error (the hostname is configured) and a random stack string is used later to build the DNS search list (see lines 556+ in res_init.c) For the sake of illustration, let's say the search list is set to a random value like 'xWLK'. The end result is that when trying to result an unknown domain name (e.g. 'www.ptn'), the query fails then the resolver tries to make a new query with the DNS search list path(s) appended (e.g. 'www.ptn.xWLK'). The patch simply initializes 'defdname' to an empty string to avoid this when the net.dns.search system property is not set. Also contains whitespace/formatting fixes
* 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.
* merge from open-source masterJean-Baptiste Queru2009-09-151-1/+1
|\
| * Include <endian.h> instead of <sys/endian.h>,Chih-Wei Huang2009-08-311-1/+1
| | | | | | | | since the later doesn't define byte order.
* | Don't request IPv6 addresses if AI_ADDRCONFIG is specified and the system ↵Lorenzo Colitti2009-08-041-8/+42
| | | | | | | | has no IPv6 connectivity.
* | am 3773d35e: Make the DNS resolver accept domain names with an underscore.David 'Digit' Turner2009-07-281-1/+8
|\ \ | |/ | | | | | | | | | | Merge commit '3773d35eb98e22b5edab4d82fb72bdf86ff80494' * commit '3773d35eb98e22b5edab4d82fb72bdf86ff80494': Make the DNS resolver accept domain names with an underscore.
| * Make the DNS resolver accept domain names with an underscore.David 'Digit' Turner2009-07-271-1/+8
| | | | | | | | | | | | | | More precisely, this accepts domain labels with an underscore in the middle (i.e. not at the start or the end of the label). This is needed to perform complex CNAME chain resolution in certain VPN networks.
* | Make IPv6 definitions comply with RFC 3493:Lorenzo Colitti2009-06-161-1/+0
|/ | | | | - Add some definitions to netinet/in6.h - Include netinet/in6.h from netinet/in.h
* Fix getservent() so that it returns s_port in network byte order.David 'Digit' Turner2009-05-271-2/+7
| | | | Also add a new document detailing known issues in the C library.
* 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.
* Add the domain search list for VPN connection.Chung-yih Wang2009-04-131-0/+37
| | | | | | | | | | | | The current solution is to read the net.dns.search property, and expand the list during the resolve initialization. In the future, we could implement search list per process. Update: refine the code accordingly. Update: remove unnecessary code. Update: remove the unused variable.
* auto import from //depot/cupcake/@135843The Android Open Source Project2009-03-0341-0/+15819
|
* auto import from //depot/cupcake/@135843The Android Open Source Project2009-03-0341-15819/+0
|
* auto import from //branches/cupcake/...@132276The Android Open Source Project2009-02-194-301/+1227
|
* Code drop from //branches/cupcake/...@124589The Android Open Source Project2008-12-171-5/+5
|
* Initial Contributionandroid-1.0The Android Open Source Project2008-10-2141-0/+14893