Commit Graph

4579 Commits

Author SHA1 Message Date
dignifiedquire 40fffcb74b refactor!: use NonZeroUsize for segments sizes
Start introducing more type safety for implicit assumptions, step by step
2025-12-19 11:53:40 +01:00
Diva Martínez c8f55101b5 feat(quinn-proto): Retry client sent probes when the failures might be spurious (#271)
## Description

<!-- A summary of what this pull request achieves and a rough list of
changes. -->

## Breaking Changes

<!-- Optional, if there are any breaking changes document them,
including how to migrate older code. -->

## Notes & open questions

<!-- Any notes, remarks or open questions you have to make about the PR.
-->
2025-12-18 17:14:37 +00:00
Diva Martínez a27b408d3a Merge branch 'main' into hole-punch-try-harder 2025-12-18 11:22:28 -05:00
Diva Martínez da63d58ae3 keep now as first arg 2025-12-18 10:44:55 -05:00
Philipp Krüger 9d73ec4a94 fix(proto): Send the close frame on the available path (#274)
## Description

Without this change, it's possible that we send the close frame on a
broken path only, if the broken path happens to have a path ID lower
than the available path.

## Notes & open questions

Setting `path_should_send` to true if `can_send.close` would make sense,
if we sent a close on every path, but we don't, we stop sending after
we've sent the close on one path.

I think it's possible to fix this in either direction, but IMO we should
send the close on the path we usually use for application data in
general.
2025-12-18 15:42:18 +00:00
Diva Martínez 9df126caf7 Merge branch 'main' into hole-punch-try-harder 2025-12-18 10:42:12 -05:00
Diva Martínez 0b93d82c74 address review 2025-12-18 10:42:15 -05:00
Floris Bruynooghe cd4ce43df1 Improve logging of path challenge and response frames (#281)
## Description

The display impl was not being triggered where it was, so the frames
could once again not be grepped on their frame types PATH_CHALLENGE
and PATH_RESPONSE. Which is a critical workflow for me.

Fixing their display so they show up sensibly when being written meant
that the challenge itself was now being logged differently on the send
and receive side again: hex on the send size, decimal on the receive
side. So I fixed this by starting to log frames as their proper frame
types on the receive side too.

However I'm not backfilling all the frames yet with these impls. Will
probably add them later as we improve logging.

## Breaking Changes

n/a

## Notes & open questions

We eventually need to end up with a way of consistently logging frames
both when writing and reading. But let's get there in small steps,
because doing it all at once is a bit of a pain.
2025-12-18 13:12:49 +00:00
Floris Bruynooghe 6902f3efbe clippy 2025-12-18 12:53:58 +01:00
Floris Bruynooghe 44e445343e Improve logging of path challenge and response frames
The display impl was not being triggered where it was, so the frames
could once again not be grepped on their frame types PATH_CHALLENGE
and PATH_RESPONSE. Which is a critical workflow for me.

Fixing their display so they show up sensibly when being written meant
that the challenge itself was now being logged differently on the send
and receive side again: hex on the send size, decimal on the receive
side. So I fixed this by starting to log frames as their proper frame
types on the receive side too.

However I'm not backfilling all the frames yet with these impls. Will
probably add them later as we improve logging.
2025-12-18 12:43:44 +01:00
Diva Martínez 9fac9dd3ce clippy 2025-12-17 12:07:32 -05:00
Diva Martínez 6ce31b7bba retry on max path id 2025-12-17 12:05:53 -05:00
Diva Martínez 48a14ad1ca retry pending nat probes on new cids 2025-12-17 11:51:44 -05:00
Diva Martínez 697192c0ed Merge remote-tracking branch 'n0/main' into hole-punch-try-harder 2025-12-17 10:05:15 -05:00
Philipp Krüger cfd7bbebeb fix(proto): Send the close frame on the available path 2025-12-17 11:03:53 +01:00
Friedel Ziegelmayer 4dcb3a7f05 feat(proto): improve PTO calculations on shutdown (#269)
- PTO calculations now ignore paths that have not received, or sent
anything when calculating for shutdown
- we stop sending path challenges when we are already closing, to reduce
the chance of inflight packets that are not needed
2025-12-17 09:23:15 +00:00
dignifiedquire d320c63c06 cleanup 2025-12-17 10:07:04 +01:00
dignifiedquire 0cfc00d393 feat(proto): improve PTO calculations on shutdown 2025-12-17 10:07:04 +01:00
Asmir Avdicevic 9947dfa162 fix(ci): windows test build fix (#273)
## Description

Align the windows CI tests with the rest of the build env so we avoid
sproadic config issues against fips.

## Breaking Changes

<!-- Optional, if there are any breaking changes document them,
including how to migrate older code. -->

## Notes & open questions

<!-- Any notes, remarks or open questions you have to make about the PR.
-->
2025-12-17 08:56:09 +00:00
Asmir Avdicevic c4fb84b8c4 fix(ci): windows test build fix 2025-12-17 08:46:28 +01:00
Diva Martínez 25def0a194 mark failed addresses for retry 2025-12-16 17:01:04 -05:00
Diva Martínez 56294fe707 fix(quinn-proto): set the hole punching round 2025-12-16 22:48:22 +01:00
Diva Martínez fb807023d4 Merge branch 'main' into hole-punch-try-harder 2025-12-16 16:27:07 -05:00
Diva Martínez e33186d01f create state to keep track to retries for client sent probes 2025-12-16 16:05:00 -05:00
Friedel Ziegelmayer 7a3f33ecc1 fix(proto): do not attempt to initate NAT traversal on a closed connection (#268) 2025-12-16 17:34:59 +00:00
dignifiedquire 2bfe573f90 typing 2025-12-16 18:21:52 +01:00
dignifiedquire 1ac2c3c914 fix(proto): do not attempt to initate NAT traversal on a closed connection 2025-12-16 18:21:52 +01:00
Asmir Avdicevic d1a6b5a3d1 fix(ci): windows deps (#267)
## Description

<!-- A summary of what this pull request achieves and a rough list of
changes. -->

## Breaking Changes

<!-- Optional, if there are any breaking changes document them,
including how to migrate older code. -->

## Notes & open questions

<!-- Any notes, remarks or open questions you have to make about the PR.
-->
2025-12-16 17:20:52 +00:00
Asmir Avdicevic eb59f64ae5 fix(ci): windows deps 2025-12-16 18:01:20 +01:00
Diva Martínez caccc6754d fix: include off-path challenges in setting challenge lost timer (#261)
## Description

we need to take into account path challenges for remotes other than
received ones when stopping the challenge lost timer

## Breaking Changes

n/a

## Notes & open questions

n/a
2025-12-16 16:57:31 +00:00
Diva Martínez 5b6efe9944 add set_or_stop to connection timers 2025-12-16 11:52:36 -05:00
Diva Martínez 7ab9cb15c1 Merge branch 'main' into set-off-path-challenge-timers 2025-12-16 10:13:45 -05:00
Diva Martínez 706cb2d232 refactor: move path logic for received path response to path (#259)
## Description

Moves logic about receiving path response to the path state. This helps
simplify the connection logic and have a better separation of concerns

**technically this also fixes a bug where we send multiple path open
events**

## Breaking Changes

n/a

## Notes & open questions

n/a
2025-12-16 15:06:01 +00:00
Diva Martínez 01536ace3d Merge branch 'main' into refactor-handle-path-response 2025-12-16 09:53:57 -05:00
Diva Martínez a74b51c65f Merge branch 'main' into refactor-handle-path-response 2025-12-16 09:51:28 -05:00
Diva Martínez 9cac306da1 fix(proto): Don't assume a path is validated if we had another path on the same remote (#258)
## Description

We can't assume that opening a path to a remote address is going to be
valid if we have another path to the same remote that is valid, because
they might be different four-tuples underneath.

The bug was found by a proptest in CI, that I added as a regression test
with a comment.

This should also be fixed "fully" by tracking the proper four-tuple, but
that's a bigger refactor (that I'm working on in parallel).
I'm opening this to prevent any PRs getting blocked by CI failing due to
this bug (and the proptest finding it again).
2025-12-16 14:47:43 +00:00
Philipp Krüger d5cf02696c Merge remote-tracking branch 'origin/main' into matheus23/fix-path-validation 2025-12-16 15:38:13 +01:00
Philipp Krüger 9b439430a4 Use correct prefix for the regression test 2025-12-16 15:37:53 +01:00
Philipp Krüger 04afc1c313 Change the eprintln! to a tracing::error! 2025-12-16 15:35:26 +01:00
Friedel Ziegelmayer 83b3c73239 docs: cleanup readme and update licensing infos (#266) 2025-12-16 14:30:33 +00:00
Diva Martínez 00f4bebebf Merge branch 'main' into refactor-handle-path-response 2025-12-16 09:18:52 -05:00
dignifiedquire afc6947323 docs: cleanup readme and update licensing infos 2025-12-16 15:05:14 +01:00
Friedel Ziegelmayer 8e056b5bfe ci: update branch name to main (#265) 2025-12-16 13:21:48 +00:00
dignifiedquire 6ed0e458f9 ci: update branch name to main 2025-12-16 13:59:16 +01:00
Rüdiger Klaehn 65c66d5929 deps: switch to criterion for benching (#262)
* Switch from bencher to criterion

* clippy

* MSRV
2025-12-16 10:24:03 +00:00
Asmir Avdicevic 3e1abcae86 chore(ci): cache more deps (#253)
* chore(ci): cache more deps

* pin and cache codespell

---------

Co-authored-by: Philipp Krüger <philipp.krueger1@gmail.com>
2025-12-16 09:15:42 +00:00
Diva Martínez fe9d950cc3 more little changes 2025-12-15 15:21:53 -05:00
Diva Martínez dffd8a6d9d spelling 2025-12-15 15:16:53 -05:00
Diva Martínez f53d33a4d3 reduce diff 2025-12-15 15:10:45 -05:00
ramfox 18604d36be feat: publically export UnorderedRecvStream (#260)
Co-authored-by: “ramfox” <“kasey@n0.computer”>
2025-12-15 20:08:25 +00:00