Assign dns cache size without checking environment variable ANDROID_DNS_MODE
Since resolver functions have been moved from libc to libnetd_resolv, don't need to determine if the caller is Netd via environment variable anymore. Another reason is that if the caller sets dns server without setting environment variable ANDROID_DNS_MODE with "local". The size of dns cache will be set to 0. The zero size may cause unexpected hash table index in _cache_lookup_p() because the index is counted by mod 0 (cache size). Test: netd_{unit,integration}_test pass resolv_integration_test pass Change-Id: I3988909ce2df6c26bdfa02c993bb7a1a97dc7950
Loading
Please register or sign in to comment