Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
c996225
improve handling of CID retirement, by:
kazuho Apr 8, 2024
3813fe9
more tests
kazuho Apr 9, 2024
ea6666e
Merge branch 'master' into kazuho/path-migration-mongoose
kazuho Dec 23, 2024
cf2e0a5
to avoid resource leak inside `quicly_free`, call `free(path)` even w…
kazuho Dec 23, 2024
c0451b0
restore state whenever handling of NCID fails
kazuho Dec 23, 2024
ed80eca
retire cid queue can overflow while buidling packets
kazuho Dec 23, 2024
a0849c6
refactor as a separate function
kazuho Dec 23, 2024
c9cc65e
connection close happens on path 0
kazuho Dec 23, 2024
c52800e
remove those sent to avoid unnecessary retransmission
kazuho Dec 23, 2024
d9bdf36
wip
kazuho Jan 7, 2025
53f8822
upon state exhaustion, switch from INTERNAL to PROTOCOL_VIOLATION wit…
kazuho Jan 7, 2025
00bb6e2
refine comment
kazuho Jan 7, 2025
c8a288b
refine comment
kazuho Jan 7, 2025
2c301ee
Merge branch 'master' into kazuho/path-migration-mongoose
kazuho Jan 17, 2025
1415809
clang-format
kazuho Jan 17, 2025
34e4098
use the new error code
kazuho Jan 17, 2025
9261e56
initialize the same way as src/cli.c, otherwise bf cannot be used
kazuho Jan 17, 2025
8abad75
add framework for testing various frame patterns
kazuho Jan 20, 2025
51a786f
"local" is a better term that describes "internal" to what (in this c…
kazuho Jan 20, 2025
a51cfa1
add test
kazuho Jan 20, 2025
540c44e
set reason phrase to empty string after handling special cases, other…
deweerdt Jan 20, 2025
6e7b2fe
oops
kazuho Jan 20, 2025
33397d2
Merge branch 'master' into kazuho/path-migration-mongoose
kazuho Sep 18, 2025
2e4f257
remove excess blank line
kazuho Sep 18, 2025
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
2 changes: 0 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@ SET(QUICLY_LIBRARY_FILES
lib/rate.c
lib/recvstate.c
lib/remote_cid.c
lib/retire_cid.c
lib/sendstate.c
lib/sentmap.c
lib/streambuf.c
Expand All @@ -77,7 +76,6 @@ SET(UNITTEST_SOURCE_FILES
t/ranges.c
t/rate.c
t/remote_cid.c
t/retire_cid.c
t/sentmap.c
t/simple.c
t/stream-concurrency.c
Expand Down
2 changes: 1 addition & 1 deletion include/quicly/constants.h
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ typedef int64_t quicly_error_t;
#define QUICLY_TRANSPORT_ERROR_AEAD_LIMIT_REACHED QUICLY_ERROR_FROM_TRANSPORT_ERROR_CODE(0xf)
#define QUICLY_TRANSPORT_ERROR_CRYPTO(tls_alert) QUICLY_ERROR_FROM_TRANSPORT_ERROR_CODE(0x100 + (tls_alert))

/* internal error codes, used purely for signaling status to the application */
/* local error codes, used for signaling status between quicly and the application */
#define QUICLY_ERROR_PACKET_IGNORED 0xff01
#define QUICLY_ERROR_SENDBUF_FULL 0xff02 /* internal use only; the error code is never exposed to the application */
#define QUICLY_ERROR_FREE_CONNECTION 0xff03 /* returned by quicly_send when the connection is freeable */
Expand Down
28 changes: 21 additions & 7 deletions include/quicly/remote_cid.h
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,13 @@ typedef struct st_quicly_remote_cid_set_t {
* we expect to receive CIDs with sequence number smaller than or equal to this number
*/
uint64_t _largest_sequence_expected;
/**
* queue containing CID sequence numbers that should be sent using RETIRE_CONNECTION_ID frames
*/
struct {
uint64_t cids[QUICLY_LOCAL_ACTIVE_CONNECTION_ID_LIMIT * 2];
size_t count;
} retired;
} quicly_remote_cid_set_t;

/**
Expand All @@ -93,17 +100,24 @@ typedef struct st_quicly_remote_cid_set_t {
*/
void quicly_remote_cid_init_set(quicly_remote_cid_set_t *set, ptls_iovec_t *initial_cid, void (*random_bytes)(void *, size_t));
/**
* registers received connection ID
* returns 0 if successful (registered or ignored because of duplication/stale information), transport error code otherwise
* Registers received connection ID at the same time pushing CIDs onto the retired queue, if any. Returns 0 if successful (CID set
* is either updated or given information is ignored due to being state), or a transport error code if an error occurs.
*/
quicly_error_t quicly_remote_cid_register(quicly_remote_cid_set_t *set, uint64_t sequence, const uint8_t *cid, size_t cid_len,
const uint8_t srt[QUICLY_STATELESS_RESET_TOKEN_LEN], uint64_t retire_prior_to,
uint64_t unregistered_seqs[QUICLY_LOCAL_ACTIVE_CONNECTION_ID_LIMIT],
size_t *num_unregistered_seqs);
const uint8_t srt[QUICLY_STATELESS_RESET_TOKEN_LEN], uint64_t retire_prior_to);
/**
* Unregisters specified CID from the store, pushing the unregistered CID onto the retired queue. The former always succeeds, while
* the latter might fail due to state exhaustion, in which case an error is returned.
*/
int quicly_remote_cid_unregister(quicly_remote_cid_set_t *set, uint64_t sequence);
/**
* pushes a CID sequence number to the retired queue
*/
int quicly_remote_cid_push_retired(quicly_remote_cid_set_t *set, uint64_t sequence);
/**
* unregisters specified CID from the store
* removed the first `count` sequence numbers from the retired queue
*/
void quicly_remote_cid_unregister(quicly_remote_cid_set_t *set, uint64_t sequence);
void quicly_remote_cid_shift_retired(quicly_remote_cid_set_t *set, size_t count);

#ifdef __cplusplus
}
Expand Down
64 changes: 0 additions & 64 deletions include/quicly/retire_cid.h

This file was deleted.

Loading