mirror of
https://github.com/espressif/openthread.git
synced 2026-08-09 12:17:47 +00:00
[posix] add an option to disable resolv.conf on initialization (#11343)
On Android we didn't have a chance to disable reading from `resolv.conf` at initialization of `Resolver`. This caused a logging line at critical level which could be confusing.
This commit is contained in:
@@ -435,4 +435,13 @@
|
||||
#define OPENTHREAD_POSIX_CONFIG_TMP_STORAGE_ENABLE 1
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @def OPENTHREAD_POSIX_CONFIG_RESOLV_CONF_ENABLED_INIT
|
||||
*
|
||||
* Define as 1 to enable reading from resolv.conf on initialization.
|
||||
*/
|
||||
#ifndef OPENTHREAD_POSIX_CONFIG_RESOLV_CONF_ENABLED_INIT
|
||||
#define OPENTHREAD_POSIX_CONFIG_RESOLV_CONF_ENABLED_INIT (!OPENTHREAD_POSIX_CONFIG_ANDROID_ENABLE)
|
||||
#endif
|
||||
|
||||
#endif // OPENTHREAD_PLATFORM_POSIX_CONFIG_H_
|
||||
|
||||
@@ -123,7 +123,7 @@ private:
|
||||
void TryRefreshDnsServerList(void);
|
||||
void LoadDnsServerListFromConf(void);
|
||||
|
||||
bool mIsResolvConfEnabled = true;
|
||||
bool mIsResolvConfEnabled = OPENTHREAD_POSIX_CONFIG_RESOLV_CONF_ENABLED_INIT;
|
||||
uint32_t mUpstreamDnsServerCount = 0;
|
||||
otIp6Address mUpstreamDnsServerList[kMaxUpstreamServerCount];
|
||||
uint64_t mUpstreamDnsServerListFreshness = 0;
|
||||
|
||||
Reference in New Issue
Block a user