aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorVladimir Homutov <vl@nginx.com>2021-10-22 12:59:44 +0300
committerVladimir Homutov <vl@nginx.com>2021-10-22 12:59:44 +0300
commitdbb59fba8ce551a790aada19d4c447efb7545815 (patch)
tree89b1725bce33a3a975bca2ad34d91122c9c41ab4 /src
parentf5d0c6db674b9c40f995559051e8847157229b57 (diff)
downloadnginx-dbb59fba8ce551a790aada19d4c447efb7545815.tar.gz
nginx-dbb59fba8ce551a790aada19d4c447efb7545815.zip
QUIC: fixed processing of minimum packet size.
If packet needs to be expanded (for example Initial to 1200 bytes), but path limit is less, such packet should not be created/sent.
Diffstat (limited to 'src')
-rw-r--r--src/event/quic/ngx_event_quic_output.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/event/quic/ngx_event_quic_output.c b/src/event/quic/ngx_event_quic_output.c
index dbcdb70d5..d7e74a63a 100644
--- a/src/event/quic/ngx_event_quic_output.c
+++ b/src/event/quic/ngx_event_quic_output.c
@@ -184,6 +184,10 @@ ngx_quic_create_datagrams(ngx_connection_t *c, ngx_quic_socket_t *qsock)
min = (i == pad && p - dst < NGX_QUIC_MIN_INITIAL_SIZE)
? NGX_QUIC_MIN_INITIAL_SIZE - (p - dst) : 0;
+ if (min > len) {
+ continue;
+ }
+
n = ngx_quic_output_packet(c, ctx, p, len, min, qsock);
if (n == NGX_ERROR) {
return NGX_ERROR;