feat: enhance address handling in EndpointState #3608
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
SourceisApporNamedAppand the current UDP send address isn’t part of the new set, clear validity for all existing direct paths and resetlast_call_me_maybeto trigger immediate discovery instead of waiting the 6.5s trust window.EndpointIdbut a new bind address.Closes Client sends to wrong address on server restart #3602
Implementation details:
EndpointState::update_from_endpoint_addr:new_addrsinto aVec<SocketAddr>and update paths via the guard.last_call_me_maybe.Also:
udp_pathswhile aMutAccessguard is held.Touched files:
iroh/src/magicsock/endpoint_map/endpoint_state.rsBreaking Changes
None.
Notes & open questions
Source::AppandSource::NamedAppso discovery-initiated updates keep current behavior.Change checklist
quic-rpciroh-gossipiroh-blobsdumbpipesendme