summaryrefslogtreecommitdiffhomepage
path: root/src/event/quic/ngx_event_quic_migration.h (follow)
AgeCommit message (Collapse)AuthorFilesLines
2023-12-16QUIC: fixed format specifier after a6f79f044de5.Sergey Kandaurov1-1/+1
2023-08-14QUIC: path MTU discovery.Roman Arutyunyan1-4/+8
MTU selection starts by doubling the initial MTU until the first failure. Then binary search is used to find the path MTU.
2023-07-06QUIC: removed path->limited flag.Roman Arutyunyan1-4/+3
Its value is the opposite of path->validated.
2022-01-28QUIC: got rid of hash symbol in backup and logging.Vladimir Homutov1-1/+1
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-15/+15
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-13QUIC: improved path validation.Vladimir Homutov1-2/+0
Previously, path was considered valid during arbitrary selected 10m timeout since validation. This is quite not what RFC 9000 says; the relevant part is: An endpoint MAY skip validation of a peer address if that address has been seen recently. The patch considers a path to be 'recently seen' if packets were received during idle timeout. If a packet is received from the path that was seen not so recently, such path is considered new, and anti-amplification restrictions apply.
2021-11-29QUIC: fixed migration during NAT rebinding.Vladimir Homutov1-2/+2
The RFC 9000 allows a packet from known CID arrive from unknown path: These requirements regarding connection ID reuse apply only to the sending of packets, as unintentional changes in path without a change in connection ID are possible. For example, after a period of network inactivity, NAT rebinding might cause packets to be sent on a new path when the client resumes sending. Before the patch, such packets were rejected with an error in the ngx_quic_check_migration() function. Removing the check makes the separate function excessive - remaining checks are early migration check and "disable_active_migration" check. The latter is a transport parameter sent to client and it should not be used by server. The server should send "disable_active_migration" "if the endpoint does not support active connection migration" (18.2). The support status depends on nginx configuration: to have migration working with multiple workers, you need bpf helper, available on recent Linux systems. The patch does not set "disable_active_migration" automatically and leaves it for the administrator. By default, active migration is enabled. RFC 900 says that it is ok to migrate if the peer violates "disable_active_migration" flag requirements: If the peer violates this requirement, the endpoint MUST either drop the incoming packets on that path without generating a Stateless Reset OR proceed with path validation and allow the peer to migrate. Generating a Stateless Reset or closing the connection would allow third parties in the network to cause connections to close by spoofing or otherwise manipulating observed traffic. So, nginx adheres to the second option and proceeds to path validation. Note: The ngtcp2 may be used for testing both active migration and NAT rebinding: ngtcp2/client --change-local-addr=200ms --delay-stream=500ms <ip> <port> <url> ngtcp2/client --change-local-addr=200ms --delay-stream=500ms --nat-rebinding \ <ip> <port> <url>
2021-05-05QUIC: simplified sending 1-RTT only frames.Sergey Kandaurov1-2/+2
2021-04-29QUIC: connection migration.Vladimir Homutov1-0/+24
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-14QUIC: headers cleanup.Vladimir Homutov1-1/+1
The "ngx_event_quic.h" header file now contains only public definitions, used by modules. All internal definitions are moved into the "ngx_event_quic_connection.h" header file.
2021-03-31QUIC: distinct files for connection migration.Vladimir Homutov1-0/+20
The connection migration-related code from quic.c with dependencies is moved into separate file.