]> git.kaiwu.me - nginx.git/commitdiff
QUIC: removed path->limited flag.
authorRoman Arutyunyan <arut@nginx.com>
Thu, 6 Jul 2023 13:49:01 +0000 (17:49 +0400)
committerRoman Arutyunyan <arut@nginx.com>
Thu, 6 Jul 2023 13:49:01 +0000 (17:49 +0400)
Its value is the opposite of path->validated.

src/event/quic/ngx_event_quic.c
src/event/quic/ngx_event_quic_connection.h
src/event/quic/ngx_event_quic_migration.c
src/event/quic/ngx_event_quic_migration.h
src/event/quic/ngx_event_quic_output.c
src/event/quic/ngx_event_quic_socket.c

index b559c485d3116caf8ec4bd829655dfd27e10d586..25f658fd4ed43bc88d5c808a10516de30fd1f341 100644 (file)
@@ -1013,7 +1013,6 @@ ngx_quic_handle_payload(ngx_connection_t *c, ngx_quic_header_t *pkt)
 
         if (!qc->path->validated) {
             qc->path->validated = 1;
-            qc->path->limited = 0;
             ngx_quic_path_dbg(c, "in handshake", qc->path);
             ngx_post_event(&qc->push, &ngx_posted_events);
         }
index 466f90f93f8e268bf30b05141950353f525899c9..0dd2392e70457dc3ae3aa5e6c8e8e70a459d8410 100644 (file)
@@ -101,7 +101,6 @@ struct ngx_quic_path_s {
     u_char                            text[NGX_SOCKADDR_STRLEN];
     unsigned                          validated:1;
     unsigned                          validating:1;
-    unsigned                          limited:1;
 };
 
 
index cf0438fbc7d3cf20ffd138128783068c929c0162..ca821f8b47b638f4285287ec3afae1c8e5b42c4c 100644 (file)
@@ -168,7 +168,6 @@ valid:
 
     path->validated = 1;
     path->validating = 0;
-    path->limited = 0;
 
     ngx_quic_set_path_timer(c);
 
@@ -208,8 +207,6 @@ ngx_quic_new_path(ngx_connection_t *c,
     path->cid = cid;
     cid->used = 1;
 
-    path->limited = 1;
-
     path->seqnum = qc->path_seqnum++;
 
     path->sockaddr = &path->sa.sockaddr;
@@ -665,7 +662,6 @@ ngx_quic_path_validation_handler(ngx_event_t *ev)
 
         path->validated = 0;
         path->validating = 0;
-        path->limited = 1;
 
 
         /* RFC 9000, 9.3.2.  On-Path Address Spoofing
index 0e1e85454e59cab074f736449640fc8bf3513cf0..7f95086be3f8a0653f4c7efb8131a7b3d246fbd1 100644 (file)
 #define NGX_QUIC_PATH_BACKUP    2
 
 #define ngx_quic_path_dbg(c, msg, path)                                       \
-    ngx_log_debug7(NGX_LOG_DEBUG_EVENT, c->log, 0,                            \
-                   "quic path seq:%uL %s sent:%O recvd:%O state:%s%s%s",      \
+    ngx_log_debug6(NGX_LOG_DEBUG_EVENT, c->log, 0,                            \
+                   "quic path seq:%uL %s sent:%O recvd:%O state:%s%s",        \
                    path->seqnum, msg, path->sent, path->received,             \
-                   path->limited ? "L" : "", path->validated ? "V": "N",      \
-                   path->validating ? "R": "");
+                   path->validated ? "V": "N", path->validating ? "R": "");
 
 ngx_int_t ngx_quic_handle_path_challenge_frame(ngx_connection_t *c,
     ngx_quic_header_t *pkt, ngx_quic_path_challenge_frame_t *f);
index ecd5c2cef4618a8e3445a94b7c6796756b6fc5bf..23235e235e8ad3392c6a3716c322bc591d454fb6 100644 (file)
@@ -281,7 +281,7 @@ ngx_quic_allow_segmentation(ngx_connection_t *c)
         return 0;
     }
 
-    if (qc->path->limited) {
+    if (!qc->path->validated) {
         /* don't even try to be faster on non-validated paths */
         return 0;
     }
@@ -1275,7 +1275,7 @@ ngx_quic_path_limit(ngx_connection_t *c, ngx_quic_path_t *path, size_t size)
 {
     off_t  max;
 
-    if (path->limited) {
+    if (!path->validated) {
         max = path->received * 3;
         max = (path->sent >= max) ? 0 : max - path->sent;
 
index 6652523b7124444ea450965066802c739b75b471..8339de3faef32d7cc3b2caef722058cdab0b6a3b 100644 (file)
@@ -82,7 +82,6 @@ ngx_quic_open_sockets(ngx_connection_t *c, ngx_quic_connection_t *qc,
 
     if (pkt->validated) {
         qc->path->validated = 1;
-        qc->path->limited = 0;
     }
 
     ngx_quic_path_dbg(c, "set active", qc->path);