Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 989d2233 authored by nuccachen's avatar nuccachen Committed by Hungming Chen
Browse files

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
parent a313f658
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment