Skip to content

Commit

Permalink
Log only interface index for default routes
Browse files Browse the repository at this point in the history
  • Loading branch information
dlon committed Sep 11, 2023
1 parent 06853dd commit 52cc7c8
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion talpid-routing/src/unix/macos/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -387,7 +387,14 @@ impl RouteManagerImpl {

let old_route = std::mem::replace(default_route, best_route);

log::debug!("New default route ({family:?}): {old_route:?} -> {default_route:?}");
log::debug!(
"Default route change ({family:?}): interface {} -> {}",
old_route.map(|r| r.interface_index()).unwrap_or(0),
default_route
.as_ref()
.map(|r| r.interface_index())
.unwrap_or(0),
);

// Notify default route listeners
let event = match (family, default_route.is_some()) {
Expand Down

0 comments on commit 52cc7c8

Please sign in to comment.