summaryrefslogtreecommitdiffhomepage
path: root/src/event/quic/ngx_event_quic_connid.c (follow)
AgeCommit message (Collapse)AuthorFilesLines
2025-05-23QUIC: ssl_encryption_level_t abstraction layer.Sergey Kandaurov1-3/+3
Encryption level values are decoupled from ssl_encryption_level_t, which is now limited to BoringSSL QUIC callbacks, with mappings provided. Although the values match, this provides a technically safe approach, in particular, to access protection level sized arrays. In preparation for using OpenSSL 3.5 TLS callbacks.
2022-01-28QUIC: got rid of hash symbol in backup and logging.Vladimir Homutov1-2/+2
Now all objectes with sequence number (i.e. sockets, connection ids and paths) are logged as "foo seq:N".
2022-01-19QUIC: reworked migration handling.Vladimir Homutov1-171/+60
The quic connection now holds active, backup and probe paths instead of sockets. The number of migration paths is now limited and cannot be inflated by a bad client or an attacker. The client id is now associated with path rather than socket. This allows to simplify processing of output and connection ids handling. New migration abandons any previously started migrations. This allows to free consumed client ids and request new for use in future migrations and make progress in case when connection id limit is hit during migration. A path now can be revalidated without losing its state. The patch also fixes various issues with NAT rebinding case handling: - paths are now validated (previously, there was no validation and paths were left in limited state) - attempt to reuse id on different path is now again verified (this was broken in 40445fc7c403) - former path is now validated in case of apparent migration
2021-12-27QUIC: got rid of ngx_quic_create_temp_socket().Vladimir Homutov1-1/+1
It was mostly copy of the ngx_quic_listen(). Now ngx_quic_listen() no longer generates server id and increments seqnum. Instead, the server id is generated when the socket is created. The ngx_quic_alloc_socket() function is renamed to ngx_quic_create_socket().
2021-12-02QUIC: fixed using of retired connection id (ticket #2289).Vladimir Homutov1-4/+6
RFC 9000 19.16 The sequence number specified in a RETIRE_CONNECTION_ID frame MUST NOT refer to the Destination Connection ID field of the packet in which the frame is contained. Before the patch, the RETIRE_CONNECTION_ID frame was sent before switching to the new client id. If retired client id was currently in use, this lead to violation of the spec.
2021-11-18QUIC: fixed handling of RETIRE_CONNECTION_ID frame.Vladimir Homutov1-27/+53
Previously, the retired socket was not closed if it didn't match active or backup. New sockets could not be created (due to count limit), since retired socket was not closed before calling ngx_quic_create_sockets(). When replacing retired socket, new socket is only requested after closing old one, to avoid hitting the limit on the number of active connection ids. Together with added restrictions, this fixes an issue when a current socket could be closed during migration, recreated and erroneously reused leading to null pointer dereference.
2021-11-18QUIC: additional checks for the RETIRE_CONNECTION_ID frame.Vladimir Homutov1-0/+33
2021-10-13QUIC: fixed removal of unused client IDs.Vladimir Homutov1-3/+6
If client ID was never used, its refcount is zero. To keep things simple, the ngx_quic_unref_client_id() function is now aware of such IDs. If client ID was used, the ngx_quic_replace_retired_client_id() function is supposed to find all users and unref the ID, thus ngx_quic_unref_client_id() should not be called after it.
2021-06-16QUIC: updated specification references.Sergey Kandaurov1-4/+8
This includes updating citations and further clarification.
2021-05-05QUIC: simplified sending 1-RTT only frames.Sergey Kandaurov1-12/+7
2021-05-05QUIC: relaxed client id requirements.Vladimir Homutov1-0/+29
Client IDs cannot be reused on different paths. This change allows to reuse client id previosly seen on the same path (but with different dcid) in case when no unused client IDs are available.
2021-04-29QUIC: connection migration.Vladimir Homutov1-239/+228
The patch adds proper transitions between multiple networking addresses that can be used by a single quic connection. New networking paths are validated using PATH_CHALLENGE/PATH_RESPONSE frames.
2021-04-13QUIC: separate files for connection id related processing.Vladimir Homutov1-0/+532