Skip to content

Commit

Permalink
Reapply unscoped routes aggressively
Browse files Browse the repository at this point in the history
  • Loading branch information
dlon committed Sep 11, 2023
1 parent 1d260ea commit 47123cb
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions talpid-routing/src/unix/macos/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -355,7 +355,15 @@ impl RouteManagerImpl {
} else {
interface::Family::V6
};
self.update_best_default_route(ip_version).await
self.update_best_default_route(ip_version).await?;


// Substitute route with a tunnel route
self.apply_tunnel_default_route().await?;

// Update routes using default interface
self.apply_non_tunnel_routes().await

}

async fn update_best_default_route(&mut self, family: interface::Family) -> Result<()> {
Expand Down Expand Up @@ -386,12 +394,6 @@ impl RouteManagerImpl {
self.default_route_listeners
.retain(|tx| tx.unbounded_send(event).is_ok());

// Substitute route with a tunnel route
self.apply_tunnel_default_route().await?;

// Update routes using default interface
self.apply_non_tunnel_routes().await?;

Ok(())
}

Expand Down

0 comments on commit 47123cb

Please sign in to comment.