diff options
| author | David Lönnhager <david.l@mullvad.net> | 2020-10-02 10:39:38 +0200 |
|---|---|---|
| committer | David Lönnhager <david.l@mullvad.net> | 2020-10-02 10:39:38 +0200 |
| commit | 1a72258f2135a3504d69a28bbcb6bd5631abbbee (patch) | |
| tree | 1af1ed15e5ff4aed162975b33f89f1966196d76b | |
| parent | aed67583723a327eafe74d6bc7f61e7e1288f28d (diff) | |
| parent | 418efc3c9e9c3042b0a7d713f8f99e560ee804af (diff) | |
| download | mullvadvpn-1a72258f2135a3504d69a28bbcb6bd5631abbbee.tar.xz mullvadvpn-1a72258f2135a3504d69a28bbcb6bd5631abbbee.zip | |
Merge branch 'linux-improve-error-log'
| -rw-r--r-- | talpid-core/src/routing/linux.rs | 25 |
1 files changed, 19 insertions, 6 deletions
diff --git a/talpid-core/src/routing/linux.rs b/talpid-core/src/routing/linux.rs index abf64c8fe1..025804d3e1 100644 --- a/talpid-core/src/routing/linux.rs +++ b/talpid-core/src/routing/linux.rs @@ -450,12 +450,25 @@ impl RouteManagerImpl { let mut exclusions_route = route.clone(); exclusions_route.table_id = self.split_table_id; if let Err(error) = self.delete_route(&exclusions_route).await { - // This may be expected when routes are deleted by the kernel - log::debug!( - "Failed to remove exclusions route: {}\n{}", - exclusions_route, - error.display_chain(), - ); + match error { + Error::NetlinkError(rtnetlink::Error::NetlinkError(error)) => { + // Not finding the route is expected if the link goes down + if error.code != -libc::ESRCH { + log::error!( + "Failed to remove exclusions route: {}\n{}", + exclusions_route, + error + ); + } + } + error => { + log::error!( + "Failed to remove exclusions route: {}\n{}", + exclusions_route, + error.display_chain() + ); + } + } } } |
