diff src/event/quic/ngx_event_quic_transport.h @ 8971: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
line wrap: on
line diff
--- a/src/event/quic/ngx_event_quic_transport.h
+++ b/src/event/quic/ngx_event_quic_transport.h
@@ -300,6 +300,7 @@ struct ngx_quic_frame_s {
 
 typedef struct {
     ngx_log_t                                  *log;
+    ngx_quic_path_t                            *path;
 
     ngx_quic_keys_t                            *keys;
 
@@ -335,6 +336,7 @@ typedef struct {
     unsigned                                    validated:1;
     unsigned                                    retried:1;
     unsigned                                    first:1;
+    unsigned                                    rebound:1;
 } ngx_quic_header_t;