Skip to content
Draft
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Merge remote-tracking branch 'origin/feat-multipath' into Frando/mp-f…
…ix-remote-state-actor-loop
  • Loading branch information
matheus23 committed Nov 20, 2025
commit e98b835b4b8ed1962c57427d975ad6ab0e1a171d
14 changes: 11 additions & 3 deletions iroh/src/magicsock/remote_map/remote_state.rs
Original file line number Diff line number Diff line change
Expand Up @@ -375,9 +375,17 @@ impl RemoteStateActor {
if self.paths.is_empty() {
warn!("Cannot send datagrams: No paths to remote endpoint known");
}
for addr in self.paths.keys() {
if let Err(err) = self.send_datagram(addr.clone(), transmit.clone()).await {
debug!(?addr, "failed to send datagram: {err:#}");
for addr in self.paths.addrs() {
// We never want to send to our local addresses.
// The local address set is updated in the main loop so we can use `peek` here.
if let transports::Addr::Ip(sockaddr) = addr
&& self.local_addrs.peek().iter().any(|a| a.addr == *sockaddr)
{
trace!(%sockaddr, "not sending datagram to our own address");
} else {
if let Err(err) = self.send_datagram(addr.clone(), transmit.clone()).await {
debug!(?addr, "failed to send datagram: {err:#}");
}
}
}
// This message is received *before* a connection is added. So we do
Expand Down
5 changes: 5 additions & 0 deletions iroh/src/magicsock/remote_map/remote_state/path_state.rs
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,11 @@ impl RemotePathState {
self.paths.keys()
}

/// Returns whether this stores any addresses.
pub(super) fn is_empty(&self) -> bool {
self.paths.is_empty()
}

/// Replies to all pending resolve requests.
///
/// This is a no-op if no requests are queued. Replies `Ok` if we have any known paths,
Expand Down
Loading
You are viewing a condensed version of this merge commit. You can view the full changes here.