Mercurial > hg > nginx
changeset 9144:bba136612fe4
QUIC: removed path->limited flag.
Its value is the opposite of path->validated.
author | Roman Arutyunyan <arut@nginx.com> |
---|---|
date | Thu, 06 Jul 2023 17:49:01 +0400 |
parents | 48691bab4474 |
children | 93aee926d27f |
files | 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 |
diffstat | 6 files changed, 5 insertions(+), 13 deletions(-) [+] |
line wrap: on
line diff
--- a/src/event/quic/ngx_event_quic.c Mon Aug 14 08:28:30 2023 +0400 +++ b/src/event/quic/ngx_event_quic.c Thu Jul 06 17:49:01 2023 +0400 @@ -1013,7 +1013,6 @@ 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); }
--- a/src/event/quic/ngx_event_quic_connection.h Mon Aug 14 08:28:30 2023 +0400 +++ b/src/event/quic/ngx_event_quic_connection.h Thu Jul 06 17:49:01 2023 +0400 @@ -101,7 +101,6 @@ u_char text[NGX_SOCKADDR_STRLEN]; unsigned validated:1; unsigned validating:1; - unsigned limited:1; };
--- a/src/event/quic/ngx_event_quic_migration.c Mon Aug 14 08:28:30 2023 +0400 +++ b/src/event/quic/ngx_event_quic_migration.c Thu Jul 06 17:49:01 2023 +0400 @@ -168,7 +168,6 @@ path->validated = 1; path->validating = 0; - path->limited = 0; ngx_quic_set_path_timer(c); @@ -208,8 +207,6 @@ path->cid = cid; cid->used = 1; - path->limited = 1; - path->seqnum = qc->path_seqnum++; path->sockaddr = &path->sa.sockaddr; @@ -665,7 +662,6 @@ path->validated = 0; path->validating = 0; - path->limited = 1; /* RFC 9000, 9.3.2. On-Path Address Spoofing
--- a/src/event/quic/ngx_event_quic_migration.h Mon Aug 14 08:28:30 2023 +0400 +++ b/src/event/quic/ngx_event_quic_migration.h Thu Jul 06 17:49:01 2023 +0400 @@ -18,11 +18,10 @@ #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);
--- a/src/event/quic/ngx_event_quic_output.c Mon Aug 14 08:28:30 2023 +0400 +++ b/src/event/quic/ngx_event_quic_output.c Thu Jul 06 17:49:01 2023 +0400 @@ -281,7 +281,7 @@ 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 @@ { off_t max; - if (path->limited) { + if (!path->validated) { max = path->received * 3; max = (path->sent >= max) ? 0 : max - path->sent;