comparison src/event/quic/ngx_event_quic_transport.h @ 8797:1e2f4e9c8195 quic

QUIC: reworked migration handling. 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
author Vladimir Homutov <vl@nginx.com>
date Wed, 19 Jan 2022 22:39:24 +0300
parents d6ef13c5fd8e
children 3550b00d9dc8
comparison
equal deleted inserted replaced
8796:7106a918a277 8797:1e2f4e9c8195
298 }; 298 };
299 299
300 300
301 typedef struct { 301 typedef struct {
302 ngx_log_t *log; 302 ngx_log_t *log;
303 ngx_quic_path_t *path;
303 304
304 ngx_quic_keys_t *keys; 305 ngx_quic_keys_t *keys;
305 306
306 ngx_msec_t received; 307 ngx_msec_t received;
307 uint64_t number; 308 uint64_t number;
333 unsigned parsed:1; 334 unsigned parsed:1;
334 unsigned decrypted:1; 335 unsigned decrypted:1;
335 unsigned validated:1; 336 unsigned validated:1;
336 unsigned retried:1; 337 unsigned retried:1;
337 unsigned first:1; 338 unsigned first:1;
339 unsigned rebound:1;
338 } ngx_quic_header_t; 340 } ngx_quic_header_t;
339 341
340 342
341 typedef struct { 343 typedef struct {
342 ngx_msec_t max_idle_timeout; 344 ngx_msec_t max_idle_timeout;