History log of /bionic/libc/dns/include/resolv_netid.h
Revision Date Author Comments
589afca92c2fa026f908ec2c54c0450c438c602c 18-Apr-2016 Pierre Imai <imaipi@google.com> DO NOT MERGE Store DNS server count in resolv_cache.

Instead of keeping a sentinel after nameservers[], nsaddrinfo[] and
nstats[], store the server count in the structure, freeing up memory and
eliminating the need to enumerate the server count every time
_resolv_is_nameservers_equal_locked() is invoked.

Also increase MAXNS from 3 to 4.

BUG: 28153323
Change-Id: I11a7257af695157c9e32019cd00c67b535b63c75
(cherry picked from commit fff356786f8a3a98c5c29f12bb7e59e6d98076a9)
4d8e740b0868b2670599b949ff07d74e5f317114 22-Feb-2016 Pierre Imai <imaipi@google.com> DO NOT MERGE: Ignore unreliable DNS servers.

Collect statistics about DNS query success state and delay. Ignore
servers that have been tried at least five times and have a success rate
of < 0.25. Retry these servers once every 180s.

Bug: 25731675

(cherry picked from commit 6b3f0d65f2c706625e5efb495df0f2c6178b965a)

Change-Id: Id989404b14fd885fb31a5a4de36a4186be1c9ad1
754f669076ec1edfc0d597aaf89600d4c93f9a7c 25-Jun-2015 Erik Kline <ek@google.com> Pass around struct android_net_context for better behaviour

Group network context elements in to a single struct and
add a version of android_getaddrinfofornet() that accepts it.

The introduction of UID-based routing means that the UID is an
integral part of the network context when evaluating connectivity,
sorting addresses, etc.

Also, introduce a distinction between DNS netids/marks and those
expected to be used by the application. This can be important
when the network an application is using is not the same as the
network on which DNS queries will be issued.

Additionally, de-duplicate the UDP connect logic (collapse both
_test_connect() and _find_src_addr() into just the latter).

Bug: 19470192
Bug: 20733156
Bug: 21832279
Change-Id: If16c2f4744695f507993afdac078ca105eb5d3e4
(cherry picked from commit 01e37c9665018534c798daaa59d5b0adb408e0a4)
01e37c9665018534c798daaa59d5b0adb408e0a4 25-Jun-2015 Erik Kline <ek@google.com> Pass around struct android_net_context for better behaviour

Group network context elements in to a single struct and
add a version of android_getaddrinfofornet() that accepts it.

The introduction of UID-based routing means that the UID is an
integral part of the network context when evaluating connectivity,
sorting addresses, etc.

Also, introduce a distinction between DNS netids/marks and those
expected to be used by the application. This can be important
when the network an application is using is not the same as the
network on which DNS queries will be issued.

Additionally, de-duplicate the UDP connect logic (collapse both
_test_connect() and _find_src_addr() into just the latter).

Bug: 19470192
Bug: 20733156
Bug: 21832279
Change-Id: If16c2f4744695f507993afdac078ca105eb5d3e4
9773fa3ffd7c2d1de2431b8ea1eb8043e8959fcb 10-Dec-2014 Elliott Hughes <enh@google.com> Clean up DNS proxying.

Remove code duplication and fall back to trying directly if the proxy
isn't available. With this, tests still work if netd is dead (perhaps
because you've run "adb shell stop", or because you're running on the host).

Bug: 18547878
Change-Id: Ia4a9aa18b1fc79e09735107246989fa7fc6c8455
1544eae56e2713a199e085438809078ebad8e7d1 06-Aug-2014 Paul Jensen <pauljensen@google.com> Revert most of "Cleanup: Delete dead code."

This reverts most of commit 2582f02a01cd56c56a4e6c9de4444a6ec937cc37.
The DNS cache flushing code needs to be called when routes change.

Change-Id: I5b04121bc428cc6a2e136b6c3269c395bfb4981f
bug:16549455
2582f02a01cd56c56a4e6c9de4444a6ec937cc37 20-Jul-2014 Sreeram Ramachandran <sreeram@google.com> Cleanup: Delete dead code.

Bug: 15413389
Change-Id: I315468832ef18ffc84174e54774ab63b86d284dc
8563802b04347951d8878747a830987e5ca145f5 16-May-2014 Elliott Hughes <enh@google.com> Use default hidden visibility to build libc_dns.

Bug: 11156955
Change-Id: Ia443705f5fbee0681039d4480abc89850968f475
7f2d4c21cc7b7f27a5163f5a6d5bc724116a8cde 13-Jun-2014 Elliott Hughes <enh@google.com> Somewhere, the declaration of _resolv_delete_cache_for_net went missing.

I couldn't work out where this went missing from "git log", but it became
important with the switch to hidden visibility.

Change-Id: I921f81e36642a2c65c3ec85dc9b5b87c5d977a5b
41d9a503716ed6f3291f4cae097dca08d459429c 08-Apr-2014 Paul Jensen <pauljensen@google.com> Add support for deleting per-network DNS resolver caches.
This is required when the possible range of NetIds is large to
prevent netd consuming excessive amounts of memory.
This required replacing the per-cache locks in favor of a single
global lock to prevent accesses to deleted caches.

Change-Id: I99d058bafea5de743e56075dbed74031da4df63f
ea9bf6788144b83cc51c454b2bfe6b980d6e947c 14-Feb-2014 Szymon Jakubczak <szym@google.com> bionic: Replace iface with opaque netid in resolver.

Replace iface cache key with netid.

Replace _mark with netid.

Mark sockets used to test IPv4/IPv6 support as well as sockets
used to determine source address for rfc6724 sort.

Remove pid/uid mappings (functionality moved to system/netd).

Do not create resolv_cache when it does not exist, but rather only
when DNS configuration is supplied.

Clean up unused functions.

Change-Id: I9ccfda2902cc0943e87c9bc346ad9a2578accdab