diff --git a/rust/bin-shared/src/windows.rs b/rust/bin-shared/src/windows.rs index e4c9c9850..fb085fccc 100644 --- a/rust/bin-shared/src/windows.rs +++ b/rust/bin-shared/src/windows.rs @@ -251,7 +251,10 @@ fn get_best_non_tunnel_route(dst: IpAddr) -> io::Result { .filter(|adapter| is_up(adapter)) .filter_map(|adapter| find_best_route_for_luid(&adapter.Luid, dst).ok()) .min() - .ok_or(io::Error::other("No route to host"))?; + .ok_or(io::Error::new( + io::ErrorKind::HostUnreachable, + "No route to host", + ))?; tracing::debug!(src = %route.addr, %dst, "Resolved best route outside of tunnel interface");