mirror of
https://github.com/n0-computer/iroh.git
synced 2026-11-30 16:03:05 +00:00
## Description
When the network changes we should recover our connection and
holepunch again. Because quinn now tracks 4-tuples a lot of network
paths would turn into black holes because the source address would no
longer match.
This hooks up network changes to quinn so that it will close and open
new paths correctly when this happens. This should result in most
paths not being validated after a network change which in turn means
any new ADD_ADDRESS and REACH_OUT frames will be sent on the validated
path instead of a path that is no longer functional.
## Breaking Changes
n/a
## Notes & open questions
The first few commits do some renaming and documenting of stuff that's
not
strictly required. It was nicer and easier to build on top of that. If
you, the reviewer, would prefer I can split those off into a refactoring
PR and base this one on top of that.
## Change checklist
- [x] I still need to check if the server updates quinn so it can do
the correct ADD_ADDRESS and REMOVE_ADDRESS stuff.
- [x] I still need to check the sequencing of the above so things
happen in the correct order.
- [x] Investigate `endpoint_relay_connect_loop` test failure
- [ ] Self-review.
- [x] Documentation updates following the [style
guide](https://rust-lang.github.io/rfcs/1574-more-api-documentation-conventions.html#appendix-a-full-conventions-text),
if relevant.
- [ ] Tests if relevant.
---------
Co-authored-by: Diva Martínez <git@divma.net>
Co-authored-by: dignifiedquire <me@dignifiedquire.com>