summaryrefslogtreecommitdiff
path: root/libc/netbsd
AgeCommit message (Collapse)Author
2014-02-28Renamed the misleading libc/netbsd directory to libc/dns.Calin Juravle
Bug: 13219633 Change-Id: Ide43add0b90b3081cc709a22d1ff1f59d65f1104
2014-02-20Remove two DNS files that weren't being built.Elliott Hughes
And switch the makefile to just building everything in the relevant directory. Change-Id: Ia7785c4dcabb51639c2230026f8a8a9eff919a36
2014-02-17Remove duplicate definitions of MIN and MAX.Elliott Hughes
These were needed when bionic's header files were missing these macros (though it would have made a lot more sense to just fix the header files!) but cause warnings now. Change-Id: I65a677122f4f6bd07dffc3f37a0c4c0e823d1bb0
2014-01-28Remove a __system_property_get call from the DNS code.Elliott Hughes
Change-Id: I48082ad9eb1b56349c6746ab2c371728c8571a81
2013-12-11Fix dns search domain use in gethostbyname.Robert Greenwalt
Need to load search domain data before we attempt to use it. bug:6799630 Change-Id: Ib228f4ca260339f71a2e28d5930c0a722bd43c92
2013-10-09am 8826ba8a: am bc545e8a: Merge "Fix x86_64 build, clean up intermediate ↵Elliott Hughes
libraries." * commit '8826ba8ab6922927bdac2466d2903916d5806a06': Fix x86_64 build, clean up intermediate libraries.
2013-10-09Fix x86_64 build, clean up intermediate libraries.Elliott Hughes
The x86_64 build was failing because clone.S had a call to __thread_entry which was being added to a different intermediate .a on the way to making libc.so, and the linker couldn't guarantee statically that such a relocation would be possible. ld: error: out/target/product/generic_x86_64/obj/STATIC_LIBRARIES/libc_common_intermediates/libc_common.a(clone.o): requires dynamic R_X86_64_PC32 reloc against '__thread_entry' which may overflow at runtime; recompile with -fPIC This patch addresses that by ensuring that the caller and callee end up in the same intermediate .a. While I'm here, I've tried to clean up some of the mess that led to this situation too. In particular, this removes libc/private/ from the default include path (except for the DNS code), and splits out the DNS code into its own library (since it's a weird special case of upstream NetBSD code that's diverged so heavily it's unlikely ever to get back in sync). There's more cleanup of the DNS situation possible, but this is definitely a step in the right direction, and it's more than enough to get x86_64 building cleanly. Change-Id: I00425a7245b7a2573df16cc38798187d0729e7c4
2013-08-23Change how DNS resolver handle no default ifaceRobert Greenwalt
We used to just try any iface we'd been told about as a fallback, but that will end up mistakenly using a secondary network's dns when we really don't have a default connection. It also messed up our detection of whether we were doing the lookup on the default or not (we'd get back our secondary net iface as the default, do the compare and think we were on default). Remove the lies and let dns fail if we don't have an iface for it. bug:10132565 Conflicts: libc/netbsd/resolv/res_cache.c Change-Id: I357a9c34dad83215f44c5e0dd41ce2a7d6fe8f3f
2013-08-22Change how DNS resolver handle no default ifaceRobert Greenwalt
We used to just try any iface we'd been told about as a fallback, but that will end up mistakenly using a secondary network's dns when we really don't have a default connection. It also messed up our detection of whether we were doing the lookup on the default or not (we'd get back our secondary net iface as the default, do the compare and think we were on default). Remove the lies and let dns fail if we don't have an iface for it. bug:10132565 Change-Id: I5f0f2abacaaaaf23c5292b20fba9d8dcb6fb10c5
2013-08-05am a9c5bb97: Merge "Fix the detection of alt-network in dns resolver."Robert Greenwalt
* commit 'a9c5bb972df7cbb4e65cfb53673b26f9d42deacd': Fix the detection of alt-network in dns resolver.
2013-08-05Fix the detection of alt-network in dns resolver.Robert Greenwalt
Used to determine proper A/AAAA record request. bug:10132565 Change-Id: I7229f6672e879920a6fae58672cddd72db78546c
2013-07-31am e6345f1a: Merge "Tell the dns resolver about our domains."Robert Greenwalt
* commit 'e6345f1a1ec691690c69d5663ca8bb2b70240d93': Tell the dns resolver about our domains.
2013-07-31Tell the dns resolver about our domains.Robert Greenwalt
A refactor caused us to not tell the resolver about search domains until after it had done the domain fanout. bug:6799630 Change-Id: Ibabd8fa5bcc69b1490fc5e329e62eb0f2d1a5e63
2013-07-09Add marking of DNS sockets for mark based routingChad Brubaker
Adds an extra mark parameter to android_getaddrinfoforiface, android_gethostbyaddrforiface and android_gethostbynameforiface that if set will cause all packets sent by DNS requests to have that mark Change-Id: I6f72390e4ce5bfc3cc73183f9b2fb3705a11685f
2013-06-18Merge "Fix remove_uidiface_info failing on first entry"Geremy Condra
2013-06-17am 977a3313: Merge changes Iac00ce10,I192d3825Colin Cross
* commit '977a33137d2be0093f474055f839cf665b82b588': bionic: add tests for properties bionic: move system property writing from init to bionic
2013-06-17bionic: move system property writing from init to bionicColin Cross
Move the implementation of writing to the system property area from init to bionic, next to the reader implementation. This will allow full property testing to be added to bionic tests. Add new accessor and waiting functions to hide the implementation from watchprops and various bionic users. Also hide some of the implementation details of the property area from init by moving them into _system_properties.h, and other details from everybody by moving them into system_properties.h. (cherry picked from commit dc1038b7900acb664e99643d2974e1a0f4703781) Change-Id: I192d3825ee276c5047bc751039fe6cfe226a7cca
2013-06-17bionic: move system property writing from init to bionicColin Cross
Move the implementation of writing to the system property area from init to bionic, next to the reader implementation. This will allow full property testing to be added to bionic tests. Add new accessor and waiting functions to hide the implementation from watchprops and various bionic users. Also hide some of the implementation details of the property area from init by moving them into _system_properties.h, and other details from everybody by moving them into system_properties.h. Change-Id: I9026e604109e30546b2849b60cab2e7e5ff00ba5
2013-06-14Fix remove_uidiface_info failing on first entryChad Brubaker
Change-Id: Ic23506581ff835a6b679e1593eab550a84548056
2013-06-07Add clearing of resolv uid and pid interface mapsChad Brubaker
Cleanup uid interface map variable names Change-Id: I712dd83276bb23b149af4180515ef33a1bade5ea
2013-06-06Merge "Add per UID interface support to resolv cache"Geremy Condra
2013-06-06Add per UID interface support to resolv cacheChad Brubaker
Add methods to attach/detach UID ranges to a specific dns cache/interface. This mirrors the already existing code for attaching specific processes to specific interfaces but will be used to push all processes from a given user to a specific cache/interface. Change-Id: Ic24391e92d3ca46fcb46cc4fc53e13984dec40b3
2013-06-05am 5a6a0a94: am 18af4503: Merge "Ensure header files using __BEGIN_DECLS ↵Elliott Hughes
include sys/cdefs.h." * commit '5a6a0a9445d80bf2bd847088921f6d1d99315552': Ensure header files using __BEGIN_DECLS include sys/cdefs.h.
2013-06-05am 18af4503: Merge "Ensure header files using __BEGIN_DECLS include ↵Elliott Hughes
sys/cdefs.h." * commit '18af450393b005b4ead896d82cda750e6876fd33': Ensure header files using __BEGIN_DECLS include sys/cdefs.h.
2013-06-05Ensure header files using __BEGIN_DECLS include sys/cdefs.h.Elliott Hughes
We keep fixing these one-by-one; let's fix them all at once. Found thus: find . -name *.h | xargs grep -L sys/cdefs.h | xargs grep -l BEGIN_DECL | xargs grep -L sys/types Change-Id: I188842aa2484dc6176e96556d57c38a0f785b59b
2013-05-14am 509fc806: am d8a9cccb: Merge "Fix all printf warnings in res_send.c."Elliott Hughes
* commit '509fc8069757aa6091e044f659f76da0bf59723c': Fix all printf warnings in res_send.c.
2013-05-14am d8a9cccb: Merge "Fix all printf warnings in res_send.c."Elliott Hughes
* commit 'd8a9cccb4d77eecc36425c9240a12bd305031ee3': Fix all printf warnings in res_send.c.
2013-05-14Fix all printf warnings in res_send.c.Kito Cheng
Change-Id: I4bf959140b5a5475897bd80704e64e3c4645fc3f
2013-04-01am 8dd195c5: am 7a29f404: Merge "Update getaddrinfo to RFC6724"Elliott Hughes
* commit '8dd195c509eed45d1e4b5ab91ddc2ef56fcb0737': Update getaddrinfo to RFC6724
2013-04-01am 7a29f404: Merge "Update getaddrinfo to RFC6724"Elliott Hughes
* commit '7a29f404e11d3346e79154b8e8d72a3215febced': Update getaddrinfo to RFC6724
2013-04-01Update getaddrinfo to RFC6724Lorenzo Colitti
Currently, our getaddrinfo implementation does not conform to any IETF standard. It follows draft-ietf-6man-rfc3484-revise-01, but that draft has expired. Update the policy table to RFC6724. (cherry-pick of e919b116d35aa7deb24ddece69c491e24c3b0d6f.) Bug: 8276725 Change-Id: I2d17122defd966ac6c2c13d04887fb110f2598a0
2013-03-15am cf23cbb1: am 12ea8005: am 5f829205: am c1416647: Merge "Clean up internal ↵Elliott Hughes
libc logging." * commit 'cf23cbb1d4826ac579fae28e4fe796a6e4e1ddfd': Clean up internal libc logging.
2013-03-15am 5f829205: am c1416647: Merge "Clean up internal libc logging."Elliott Hughes
* commit '5f8292050fc07f4bf9e70f37a807ad028e3cfc87': Clean up internal libc logging.
2013-03-15Clean up internal libc logging.Elliott Hughes
We only need one logging API, and I prefer the one that does no allocation and is thus safe to use in any context. Also use O_CLOEXEC when opening the /dev/log files. Move everything logging-related into one header file. Change-Id: Ic1e3ea8e9b910dc29df351bff6c0aa4db26fbb58
2013-02-28Bionic: Libc: Resolv: Stricter function signatures, unitialized return bug fix.Sasha Levitskiy
Stricter input parameters help avoid ugly casting when passing pointers to immutable protobuf data. While at it: an int return was dropped from 2 functions whose users never used the result; one of the return paths was returning an uninitialized value. Size_t for portablity and warning supression, misc warnings addressed. Change-Id: I2d5cbdaf0c9b6c4621a7d397772da13da5dc0943
2013-02-22Merge "gethostbyname: fix crash"Nick Kralevich
2013-02-21Don't pass pid to dnsproxydNick Kralevich
dnsproxyd can already determine our pid by looking at our socket connection. It's dangerous (and unneeded) to pass it ourselves. Change-Id: I2596d02e361b302259ddb084be2fb75be59889c5
2013-02-21gethostbyname: fix crashNick Kralevich
When an app doesn't have the internet permission, android_open_proxy returns NULL, causing a segfault when calling fprintf. Fixed. Change-Id: I598855350ed0db3cc88e5ae3b400145418a3a615
2013-02-13resolved conflicts for merge of 62727429 to masterElliott Hughes
Change-Id: I8a3d167f3ef279a7c46cb8fb90c9477beff84d8e
2013-02-13Update getnameinfo.c, remove dead code, and fix error reporting.Elliott Hughes
Also add a unit test for the salen size checking. Bug: 1889275 Change-Id: I8ec4107df9e2e9a8571e8915525249c6e44b98ad
2013-02-07dns cache per interface iteration 2Mattias Falk
name server addresses are read from the dns cache associated wih the interface on which the request shall be done. processes which has requested to issue dns request using specific interface are now proxied to netd. added methods to attach/detach a process to a specific dns cache/interface. added getaddrinfoforinface method which takes an interface as an argument. bug:4815099 bug:5465296 Change-Id: I7a8fe1980cdf99d4d296ddc5c6411f0c72162263
2013-01-19Revert "dns cache per interface iteration 2"Robert Greenwalt
This reverts commit f1464ff95670e6dcc0e12bf9fbbeb4c0346434c9 Change-Id: I3496b9a8cb54614fe3eea016d1391c8a89f3db38
2013-01-11dns cache per interface iteration 2Mattias Falk
name server addresses are read from the dns cache associated wih the interface on which the request shall be done. processes which has requested to issue dns request using specific interface are now proxied to netd. added methods to attach/detach a process to a specific dns cache/interface. added getaddrinfoforinface method which takes an interface as an argument. Change-Id: I851ec8ab8ce3112626ad2a729078b91d013f32fd bug:4815099 bug:5465296
2013-01-09Cache negative DNS results.Robert Greenwalt
Find the TTL for the negative results using the minimum of the SOA records TTL or the MINIMUM-TTL field (RFC-2308). bug:5926539 Change-Id: I6d39c9fb558afcb7a4a5bc014d97dab4a85c0d4f
2012-11-13Add search domain to dns interface data.Robert Greenwalt
This doesn't currently use this info - it's still using the system property based data-passing. That change is comming. bug:6799630 Change-Id: I725463209855447cd04bf1457281f3084fffd692
2012-10-23More upstream NetBSD upgrades.Elliott Hughes
Change-Id: Idb781d37de3b05585271d7d258ecffd5ba87d0b8
2012-08-17Added missing cache failed notificationHenrik Engström
Added a missing call to _resolv_cache_query_failed for another fail case where it was missing (it doesn't go through the error handling under the "fail" label). This missing notification caused requests to have to wait for timeout instead of beeing notified on some failed requests. Change-Id: I904d60269c59b926784e3a397d2a860329f55142
2012-06-12am c5cab345: am 028ccf5d: Merge "Avoid multiple dns lookups for the same query"Robert Greenwalt
* commit 'c5cab3452d5ced55474e56497594579108670b51': Avoid multiple dns lookups for the same query
2012-06-12am 028ccf5d: Merge "Avoid multiple dns lookups for the same query"Robert Greenwalt
* commit '028ccf5d40dd9a945ea92aa79822c08c6f6aa1d2': Avoid multiple dns lookups for the same query
2012-06-12Merge "Avoid multiple dns lookups for the same query"Robert Greenwalt