Commit Graph

4381 Commits

Author SHA1 Message Date
Philipp Krüger 44ccd2ff93 Write failing test case 2025-11-26 13:35:10 +01:00
Floris Bruynooghe 02fd7eefcd improve logging by adding spans
- span for timers
- span for packets, this means we get path_id for some thing that are
  not on the path of processing frames.  the recv span can now lose
  the path_id.
2025-11-23 15:39:57 +01:00
Floris Bruynooghe e58b807462 fix not closing last path
We can receive a PATH_ABANDON frame for which we do not yet have any
PathData.  In this case we still want to abandon that path, and not
accidentally think we might be closing the last path.
2025-11-23 15:30:28 +01:00
Philipp Krüger 1fdbf6912e feat(quinn-proto): Use RTT from path challenges, implement path challenge resending (#178)
- Adds a timer to resend another path challenge if the old one was lost
and the path isn't validated.
- The resent challenges now have different tokens. We keep track of all
of them to verify incoming path responses.
- The logic for when to send a path challenge is simplified to only send
challenges when `send_new_challenge` is set to `true` (instead of
triggering *always* when we're in path validation mode)
2025-11-23 14:11:12 +01:00
Philipp Krüger 9f60bb7bab Fix merge 2025-11-23 12:21:18 +01:00
Philipp Krüger 45352a3a27 Merge remote-tracking branch 'origin/protocol-simplification' into matheus23/rtt-from-path-response 2025-11-23 12:21:00 +01:00
Philipp Krüger 8fc082b8d8 Less brittle logic to decide whether to send PATH_CHALLENGE 2025-11-23 12:02:30 +01:00
Philipp Krüger f8da3052fa Add a PathChallengeLost path timer for resending path challenges 2025-11-23 11:58:10 +01:00
Philipp Krüger b13b011007 Write failing tests 2025-11-23 11:23:19 +01:00
Diva Martínez 7a094bd12f fix panic 2025-11-23 04:56:38 -05:00
Philipp Krüger 07257da266 Make sure to send a path challenge on the previous path, actually 2025-11-22 18:13:32 +01:00
Philipp Krüger fe22a2bf37 Introduce PathData::is_validating_path and fix send logic 2025-11-22 11:09:18 -05:00
Philipp Krüger 4da495fe67 Write path_challenge_retransmit test 2025-11-22 11:09:18 -05:00
dignifiedquire 61c87aba64 refactor: use constants for error codes 2025-11-22 17:07:44 +01:00
Philipp Krüger 334ab73f58 Introduce PathData::is_validating_path and fix send logic 2025-11-22 16:49:41 +01:00
Floris Bruynooghe e3172987ef stop all path timers when all path data is dropped 2025-11-22 16:30:31 +01:00
Floris Bruynooghe 2e13da69ec use canonical and ipv4-mapped ipv6 addresses when needed
otherwise we're opening paths to/from the wrong remotes and packets
remotes do not match the PathData remote.
2025-11-22 16:29:10 +01:00
Philipp Krüger dc4025780b Write path_challenge_retransmit test 2025-11-22 13:04:18 +01:00
Floris Bruynooghe bfb30e81bb stop LossDetection timer when giving up on a path
might be in the wrong place
2025-11-21 18:32:52 +01:00
Philipp Krüger 079d83b5cf Update RttEstimator from path challenge responses 2025-11-21 11:52:11 -05:00
Floris Bruynooghe 6a19cc71a4 write 8 bytes, not 0 2025-11-21 17:24:19 +01:00
Floris Bruynooghe dcd734071d logging conventions 2025-11-21 16:34:41 +01:00
Floris Bruynooghe ee88899858 Change APIs to set addresses 2025-11-21 16:34:16 +01:00
Philipp Krüger 874be5e121 Update RttEstimator from path challenge responses 2025-11-21 13:09:33 +01:00
Diva Martínez 25b20638e5 track sent add and remove address in stats and sent frames 2025-11-20 10:41:01 -05:00
Diva Martínez 9188107ec1 track sent reach outs in stats and sent frames 2025-11-20 10:26:02 -05:00
Diva Martínez 4817d9616f send rand data instead of path challenges 2025-11-20 10:17:23 -05:00
Diva Martínez f71832f0be Queue server challenges 2025-11-20 06:15:13 -05:00
Floris Bruynooghe 64ff19147d Hook up id tryfrom 2025-11-20 12:12:53 +01:00
Diva Martínez 366dec68a0 modify the meaning of the transport parameter 2025-11-17 20:28:25 -05:00
Diva Martínez 49b750d5f2 Return the remotely advertised nat traversal addresses instead 2025-11-17 16:24:36 -05:00
Diva Martínez 01b4fd3324 add fields to queue pending server-side challenges 2025-11-14 16:14:15 -05:00
Diva Martínez d63019020d Merge remote-tracking branch 'n0/main-iroh' into protocol-simplification 2025-11-14 11:51:05 -05:00
Diva Martínez b73cf6a5d0 Send the reach out frames 2025-11-13 15:21:43 -05:00
Diva Martínez 86aea3e5cc fix docs 2025-11-13 14:22:20 -05:00
Diva Martínez ed1dfea1cf Send the reach out frames, probe server addresses 2025-11-13 13:16:22 -05:00
Floris Bruynooghe 246779c6f8 it's no good scheduling packets on unvalidated paths (#174) 2025-11-13 10:01:43 +01:00
Diva Martínez eed7d682f0 add retransmission fields for reach out frames 2025-11-12 23:46:16 -05:00
Floris Bruynooghe 6dcadf2867 Fix: only consider a path available if it has CIDs (#173)
Since when we locally abandon a path we retire the CIDs for it, we can
then no longer send on it.  We need to take this into account for
deciding which paths we want to send something on.

We do the CID check rather than just check of the path is in our
abandoned paths, since that is the check which is used lower down in
the loop as well.  I think this is essentially the same state.  Maybe
we could have done without the explicit set of abandoned paths as
separate state.  I'm not sure.
2025-11-12 17:12:42 +01:00
Floris Bruynooghe 3905485dcb Fix dealing with PATH_ABANDON retransmits (#172)
It is possible that we receive retransmits of PATH_ABANDON frames.  We
should handle those correctly and not panic.

We also should wait 3 * max PTO before we can decide that the remote
didn't abandon a path.
2025-11-12 13:28:41 +01:00
Floris Bruynooghe 3b3a5e8ec6 fix: reset tail-loss probes when discarding a space (#171)
If a space had a tail-loss probe scheduled when the space is discarded
the poll_transmit function was still trying to send on it.  Even
though there are no more crypto keys available for it.
2025-11-12 09:05:05 +01:00
Diva Martínez 5bc97ea4a7 Remove the path_id from the ReachOut frame 2025-11-11 15:22:02 -05:00
Diva Martínez 6dc2ba1c40 Boilerplate threading the nat traversal round call 2025-11-10 01:14:30 -05:00
Diva Martínez 38d73d0fef Thread server updates about addresses 2025-11-10 00:20:42 -05:00
Diva Martínez 9dab34f629 Add how to query the local nat traversal addresses. 2025-11-09 23:29:54 -05:00
Diva Martínez 0cce3f98c2 Send ADD_ADDRESS and REMOVE_ADDRESS frames 2025-11-09 23:23:31 -05:00
Franz Heinzmann dced59ee0a refactor: split path stats from connection stats (#168)
This separates the path stats from the connection stats. The advantage
is that accessing the stats doesn't involve an allocation (for cloning
the map of the path stats).
2025-11-07 10:45:46 +01:00
Frando c232f40b99 chore: unused var 2025-11-07 10:40:16 +01:00
Frando edb72f9e7c refactor: split path stats from connection stats 2025-11-07 10:34:42 +01:00
Floris Bruynooghe 25c75bf574 Do not remember multipath transport parameter for 0rtt (#167)
I can't find any existing tests that test this, so I'm going to skip
tests...
2025-11-07 09:23:50 +01:00