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
Change-Id: I78e24f43e388dca82fb81835e1796f4c7dce8da3
The DNS search string contains zeros as domain separator. The resolver
code erroneously used strlcpy(), which resulted in only the first domain
to be copied. The code uses pointers into this string to access the
individual domains. Since the structure is zero-initialized, this bug only
resulted in zero-length domains instead of accessing unitialized memory.
BUG: 27312811
Change-Id: Ia9d066c405dfcc5e82d6766d93ead2ce574e7b0d
The code now compiles with all combinations of DEBUG and
DEBUG_DATA except DEBUG_DATA=1, DEBUG=0, which is unsupported.
Change-Id: I9035a65c649df73092f1fc0864ae1cdd9a14aa3b
(cherrypick of 79a49c9857f3949fc13373eeb179f27b6ecdca81.)
Change-Id: I7bb44fd1fe3ef2ddfc115247f328eccfceeb5352
Signed-off-by: Patrick Tjin <pattjin@google.com>
This reverts most of commit 2582f02a01.
The DNS cache flushing code needs to be called when routes change.
Change-Id: I5b04121bc428cc6a2e136b6c3269c395bfb4981f
bug:16549455
The res_init.c changes bring us a bit closer to upstream too, though
there's still work to be done there. Some of the remaining differences
look like bugs we'd want to fix, so we should definitely try to come
back to that.
Change-Id: I50baa148e967c90d55d711e9904ad54c7d724d4d
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
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
This is part of the upstream sync (Net/Open/Free BSDs expose the
nameser.h in their public headers).
Change-Id: Ib063d4e50586748cc70201a8296cd90d2e48bbcf