summaryrefslogtreecommitdiffhomepage
path: root/src/event/quic/ngx_event_quic_output.c
diff options
context:
space:
mode:
authorVladimir Homutov <vl@nginx.com>2021-12-13 09:48:33 +0300
committerVladimir Homutov <vl@nginx.com>2021-12-13 09:48:33 +0300
commit10fd8be86d657839fbc6218891bfe9046ab5b592 (patch)
treee791bd99093c559ca1dcd3a7e93510cf175dadad /src/event/quic/ngx_event_quic_output.c
parenta31745499bcf35fac236bdc5f3d0d0a6d679b4e0 (diff)
downloadnginx-10fd8be86d657839fbc6218891bfe9046ab5b592.tar.gz
nginx-10fd8be86d657839fbc6218891bfe9046ab5b592.tar.bz2
QUIC: decoupled path state and limitation status.
The path validation status and anti-amplification limit status is actually two different variables. It is possible that validating path should not be limited (for example, when re-validating former path).
Diffstat (limited to '')
-rw-r--r--src/event/quic/ngx_event_quic_output.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/event/quic/ngx_event_quic_output.c b/src/event/quic/ngx_event_quic_output.c
index 3d75e9c39..3963ef006 100644
--- a/src/event/quic/ngx_event_quic_output.c
+++ b/src/event/quic/ngx_event_quic_output.c
@@ -160,7 +160,7 @@ ngx_quic_create_datagrams(ngx_connection_t *c, ngx_quic_socket_t *qsock)
len = ngx_min(qc->ctp.max_udp_payload_size,
NGX_QUIC_MAX_UDP_PAYLOAD_SIZE);
- if (path->state != NGX_QUIC_PATH_VALIDATED) {
+ if (path->limited) {
max = path->received * 3;
max = (path->sent >= max) ? 0 : max - path->sent;
@@ -294,7 +294,7 @@ ngx_quic_allow_segmentation(ngx_connection_t *c, ngx_quic_socket_t *qsock)
return 0;
}
- if (qsock->path->state != NGX_QUIC_PATH_VALIDATED) {
+ if (qsock->path->limited) {
/* don't even try to be faster on non-validated paths */
return 0;
}
@@ -1229,7 +1229,7 @@ ngx_quic_frame_sendto(ngx_connection_t *c, ngx_quic_frame_t *frame,
ngx_quic_init_packet(c, ctx, qc->socket, &pkt);
/* account for anti-amplification limit: expand to allowed size */
- if (path->state != NGX_QUIC_PATH_VALIDATED) {
+ if (path->limited) {
max = path->received * 3;
max = (path->sent >= max) ? 0 : max - path->sent;
if ((off_t) min > max) {