summaryrefslogtreecommitdiffstats
path: root/libc/netbsd/resolv/res_state.c
Commit message (Collapse)AuthorAgeFilesLines
* Renamed the misleading libc/netbsd directory to libc/dns.Calin Juravle2014-02-281-225/+0
| | | | | Bug: 13219633 Change-Id: Ide43add0b90b3081cc709a22d1ff1f59d65f1104
* Fix x86_64 build, clean up intermediate libraries.Elliott Hughes2013-10-091-1/+1
| | | | | | | | | | | | | | | | | | | | | | 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
* am 977a3313: Merge changes Iac00ce10,I192d3825Colin Cross2013-06-171-3/+3
|\ | | | | | | | | | | * commit '977a33137d2be0093f474055f839cf665b82b588': bionic: add tests for properties bionic: move system property writing from init to bionic
| * bionic: move system property writing from init to bionicColin Cross2013-06-171-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | am 5f829205: am c1416647: Merge "Clean up internal libc logging."Elliott Hughes2013-03-151-2/+2
|\ \ | |/ | | | | | | * commit '5f8292050fc07f4bf9e70f37a807ad028e3cfc87': Clean up internal libc logging.
| * Clean up internal libc logging.Elliott Hughes2013-03-151-2/+2
| | | | | | | | | | | | | | | | | | | | | | 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
* | dns cache per interface iteration 2Mattias Falk2013-02-071-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | Revert "dns cache per interface iteration 2"Robert Greenwalt2013-01-191-1/+1
| | | | | | | | | | | | This reverts commit f1464ff95670e6dcc0e12bf9fbbeb4c0346434c9 Change-Id: I3496b9a8cb54614fe3eea016d1391c8a89f3db38
* | dns cache per interface iteration 2Mattias Falk2013-01-111-1/+1
|/ | | | | | | | | | | | | | | | | | | 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
* Don't reset caches when dns props change.Mattias Falk2011-07-201-1/+0
| | | | | | | This happens too frequently. We should flush a per-interface cache when it's dns server addrs changes. Change-Id: I8a691c96ce9a775160ef55ddb8f755d649041583
* libc: Fix leak in the DNS thread-specific state.David 'Digit' Turner2011-05-181-29/+69
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | NOTE: This is a back-port from the internal HC branch. This patch fixes a leak that occurs when creating a new thread-specific DNS resolver state object. Essentially, each thread that calls gethostbyname() or getaddrinfo() at least once will leak a small memory block. Another leak happens anytime these functions are called after a change of the network settings. The leak is insignificant and hard to notice on typical programs. However, netd tends to create one new thread for each DNS request it processes, and quickly grows in size after a > 20 hours. The same problem is seen in other system processes that tend to create one thread per request too. The leak occured becasue res_ninit() was called twice when creating a new thread-specific DNS resolver state in _res_get_thread(). This function could not properly reset an existing thread and was leaking a memory block. The patch does two things: - First, it fixes res_ninit() to prevent any leakage when resetting the state of a given res_state instance. - Second, it modifies the _res_get_thread() implementation to make it more explicit, and avoid calling res_ninit() twice in a row on first-time creation. Fix for Bug 4089945, and Bug 4090857 Change-Id: Icde1d4d1dfb9383efdbf38d0658ba915be77942e
* resolv: make internal symbols static/hiddenJim Huang2010-10-151-0/+1
| | | | Change-Id: I988b83613e6252c0cc961555e81c10f856a38b37
* auto import from //depot/cupcake/@135843The Android Open Source Project2009-03-031-0/+185
|
* auto import from //depot/cupcake/@135843The Android Open Source Project2009-03-031-185/+0
|
* auto import from //branches/cupcake/...@132276The Android Open Source Project2009-02-191-12/+3
|
* Initial Contributionandroid-1.0The Android Open Source Project2008-10-211-0/+194