diff options
| author | Kalle Lindström <karl.lindstrom@mullvad.net> | 2025-07-14 16:59:43 +0200 |
|---|---|---|
| committer | Kalle Lindström <karl.lindstrom@mullvad.net> | 2025-07-15 14:49:21 +0200 |
| commit | 6b5413e81f2ff2e5668a7bf229b9d7c55198e7ff (patch) | |
| tree | 9b1480bbc51b4ecc94dda57c9ce5f7ccf1c4413b | |
| parent | 1f1f07ac2b8cbce16217024ac2c24a1c418cbd7d (diff) | |
| download | mullvadvpn-6b5413e81f2ff2e5668a7bf229b9d7c55198e7ff.tar.xz mullvadvpn-6b5413e81f2ff2e5668a7bf229b9d7c55198e7ff.zip | |
Prevent hickory-resolver from reading hosts file
Reading /etc/hosts causes OOM issues if the hosts files on the device is
large (e.g. > 10 MB). We should not need to read the hosts files because
the only lookups we do with hickory are to our own services which
should not be resolved from /etc/hosts.
| -rw-r--r-- | mullvad-daemon/src/android_dns.rs | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/mullvad-daemon/src/android_dns.rs b/mullvad-daemon/src/android_dns.rs index 0e665a0e8c..7735b38152 100644 --- a/mullvad-daemon/src/android_dns.rs +++ b/mullvad-daemon/src/android_dns.rs @@ -39,6 +39,7 @@ impl DnsResolver for AndroidDnsResolver { let config = ResolverConfig::from_parts(None, vec![], group); let mut opts = ResolverOpts::default(); opts.attempts = 0; + opts.use_hosts_file = false; let resolver = TokioAsyncResolver::tokio(config, opts); let lookup = resolver |
