diff options
| author | Emīls Piņķis <emils@mullvad.net> | 2020-01-07 11:46:56 +0000 |
|---|---|---|
| committer | Emīls Piņķis <emils@mullvad.net> | 2020-01-07 11:46:56 +0000 |
| commit | c479171d81a77c835f41271addd226507ed4dea7 (patch) | |
| tree | 067df1e5098c61c7f8f9277632b957d4940d406d /talpid-core/src | |
| parent | 1bef4d245fbe310bd3d852d9b12c95031378dea3 (diff) | |
| parent | 6555c147c4ee7722a99f60c2c8d644f2b6c724ac (diff) | |
| download | mullvadvpn-c479171d81a77c835f41271addd226507ed4dea7.tar.xz mullvadvpn-c479171d81a77c835f41271addd226507ed4dea7.zip | |
Merge branch 'linux-dns-without-resolv.conf'
Diffstat (limited to 'talpid-core/src')
| -rw-r--r-- | talpid-core/src/dns/linux/static_resolv_conf.rs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/talpid-core/src/dns/linux/static_resolv_conf.rs b/talpid-core/src/dns/linux/static_resolv_conf.rs index 70ff38ddce..1a867a079d 100644 --- a/talpid-core/src/dns/linux/static_resolv_conf.rs +++ b/talpid-core/src/dns/linux/static_resolv_conf.rs @@ -172,6 +172,10 @@ impl DnsWatcher { } fn read_config() -> Result<Config> { + if !std::path::Path::new(RESOLV_CONF_PATH).exists() { + return Ok(Config::new()); + } + let contents = fs::read_to_string(RESOLV_CONF_PATH) .map_err(|e| Error::ReadResolvConf(RESOLV_CONF_PATH, e))?; let config = Config::parse(&contents).map_err(|e| Error::ParseError(RESOLV_CONF_PATH, e))?; |
