History log of /bionic/libc/netbsd/resolv/res_cache.c
Revision Date Author Comments
52764f5546362d0ffab99afaffe8e8c7f21f8ef2 26-Jan-2012 Robert Greenwalt <rgreenwalt@google.com> Increase the size of the system-wide dns cache

32 enteries perhaps was ok for per-process caching with ipv4 only
but adding ipv6 records makes it effectively 16 entries and making
it system wide makes is pretty useless. Increasing to 640 entries.

bug:5841178
Change-Id: I879f8bf4d3c4d8c1708bb46d46a67c1f64b1861f
208898ee776117f42815c2fcb15903b2781bf0aa 13-Jan-2012 David 'Digit' Turner <digit@google.com> libc: remove private declarations from <time.h> and <resolv.h>

This patch is used to remove private C library declarations from the
public headers (that are exported to the NDK). It should *only* be
submitted after all other patches modifying the users of said
private functions have been submitted to the tree, to avoid
breakages.

Change-Id: I0a5e3014f8e3ac9ed8df86a5cdae506337c23252
7f84da69f86ed9daf610c8d1129392ba3f7c4405 02-Sep-2011 Robert Greenwalt <rgreenwalt@google.com> Add some logging of dns cache operations

Added info about what entries are getting flushed due to ttl or size limits.

Change-Id: I69fb70ce23b5b820f5f1a5738c0f1aa57b6a1127
92425f097dc28e9518f5608bff2fce16f9b4f0ef 29-Jul-2011 Robert Greenwalt <rgreenwalt@google.com> Don't call freeaddrinfo with a NULL ptr.

bug:5067055
Change-Id: I863dc4760a0aa449ac6298397ed571d8d9287801
9363d91218c7ed727c36ffaf82ff28d7755375ae 25-Jul-2011 Robert Greenwalt <rgreenwalt@google.com> Add per-interface dns caches.

import of changes 22100 and 23138 from opensource.

Change-Id: I3ce86394323d269272aeb2bebeed4374f171a8cf
23d3e6b21b4b6debff87da8c6558495e564cc38e 04-Apr-2011 Mattias Falk <mattias.falk@sonyericsson.com> Add support for a dns cache per interface

Initial commit for dns cache per interface.
Added a type that holds a reference to a
cache and name of associated interface,
address of interface, name server(s)
associated with an interface etc.

New functions to set default interface,
address of name servers etc.

Change-Id: Ie991bc5592fd998409853d8bf77d7fe69035dac5
3a4910c6161d57e40ba01cc9693f1a4514892b03 14-Feb-2011 Mattias Falk <mattias.falk@sonyericsson.com> Use system property to set dns cache size

Use system property ro.net.dns_cache_size to set
the size of the cache. If the system property
is not set the default cache size is defined by
CONFIG_MAX_ENTRIES.

The number of entries in the hash table will be equal
to the number of max entries allowed in the cache.

Change-Id: I77d69d7c178937fa483d0b40512483ad29232d28
3e0c5102e6d57e5b7296f95e1b318fda6114b48e 31-Jan-2011 Mattias Falk <mattias.falk@sonyericsson.com> Add time-to-live (TTL) support to resolver cache

Use the the TTL of the answer as the time a query
shall remain in the resolver cache.

Added some debugging support as well, i.e.
parse answer and print a la dig.

Change-Id: I724d3392245032592f1912f3ca7a81a8987ebbac
7cc5666d94615d9249163dc7ac0f58c2614497ce 14-Oct-2010 Jim Huang <jserv@0xlab.org> resolv: make internal symbols static/hidden

Change-Id: I988b83613e6252c0cc961555e81c10f856a38b37
d378c68d74cb4fdac450650fe816c9d649c8edaf 09-Mar-2010 David 'Digit' Turner <digit@google.com> Fix spurious DNS lookups in the C library.

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
1dc9e472e19acfe6dc7f41e429236e7eef7ceda1 04-Mar-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //depot/cupcake/@135843
1767f908af327fa388b1c66883760ad851267013 04-Mar-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //depot/cupcake/@135843
6f04a0f4c72acff80dad04828cb69ef67fa609d1 19-Feb-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //branches/cupcake/...@132276
a27d2baa0c1a2ec70f47ea9199b1dd6762c8a349 21-Oct-2008 The Android Open Source Project <initial-contribution@android.com> Initial Contribution