aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorRoman Arutyunyan <arut@nginx.com>2023-07-06 17:49:01 +0400
committerRoman Arutyunyan <arut@nginx.com>2023-07-06 17:49:01 +0400
commit3990aaaa5557d334f731dcc8f04273a0c45feee3 (patch)
tree0abab964975af40cc72f1d541fcf88b3c2719187 /src
parent4f3707c5c775ac83a0cf005617e1fdffd027b8a4 (diff)
downloadnginx-3990aaaa5557d334f731dcc8f04273a0c45feee3.tar.gz
nginx-3990aaaa5557d334f731dcc8f04273a0c45feee3.zip
QUIC: removed path->limited flag.
Its value is the opposite of path->validated.
Diffstat (limited to 'src')
-rw-r--r--src/event/quic/ngx_event_quic.c1
-rw-r--r--src/event/quic/ngx_event_quic_connection.h1
-rw-r--r--src/event/quic/ngx_event_quic_migration.c4
-rw-r--r--src/event/quic/ngx_event_quic_migration.h7
-rw-r--r--src/event/quic/ngx_event_quic_output.c4
-rw-r--r--src/event/quic/ngx_event_quic_socket.c1
6 files changed, 5 insertions, 13 deletions
diff --git a/src/event/quic/ngx_event_quic.c b/src/event/quic/ngx_event_quic.c
index b559c485d..25f658fd4 100644
--- a/src/event/quic/ngx_event_quic.c
+++ b/src/event/quic/ngx_event_quic.c
@@ -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);
}
diff --git a/src/event/quic/ngx_event_quic_connection.h b/src/event/quic/ngx_event_quic_connection.h
index 466f90f93..0dd2392e7 100644
--- a/src/event/quic/ngx_event_quic_connection.h
+++ b/src/event/quic/ngx_event_quic_connection.h
@@ -101,7 +101,6 @@ struct ngx_quic_path_s {
u_char text[NGX_SOCKADDR_STRLEN];
unsigned validated:1;
unsigned validating:1;
- unsigned limited:1;
};
diff --git a/src/event/quic/ngx_event_quic_migration.c b/src/event/quic/ngx_event_quic_migration.c
index cf0438fbc..ca821f8b4 100644
--- a/src/event/quic/ngx_event_quic_migration.c
+++ b/src/event/quic/ngx_event_quic_migration.c
@@ -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
diff --git a/src/event/quic/ngx_event_quic_migration.h b/src/event/quic/ngx_event_quic_migration.h
index 0e1e85454..7f95086be 100644
--- a/src/event/quic/ngx_event_quic_migration.h
+++ b/src/event/quic/ngx_event_quic_migration.h
@@ -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);
diff --git a/src/event/quic/ngx_event_quic_output.c b/src/event/quic/ngx_event_quic_output.c
index ecd5c2cef..23235e235 100644
--- a/src/event/quic/ngx_event_quic_output.c
+++ b/src/event/quic/ngx_event_quic_output.c
@@ -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;
diff --git a/src/event/quic/ngx_event_quic_socket.c b/src/event/quic/ngx_event_quic_socket.c
index 6652523b7..8339de3fa 100644
--- a/src/event/quic/ngx_event_quic_socket.c
+++ b/src/event/quic/ngx_event_quic_socket.c
@@ -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);