diff options
author | Roman Arutyunyan <arut@nginx.com> | 2023-07-06 11:30:47 +0400 |
---|---|---|
committer | Roman Arutyunyan <arut@nginx.com> | 2023-07-06 11:30:47 +0400 |
commit | 8ab38890736128ec0e167ae28d23d3bbfe2a2223 (patch) | |
tree | b8c8a59e70a69a27403cb9bf3ad494be01e328cd /src | |
parent | 3990aaaa5557d334f731dcc8f04273a0c45feee3 (diff) | |
download | nginx-8ab38890736128ec0e167ae28d23d3bbfe2a2223.tar.gz nginx-8ab38890736128ec0e167ae28d23d3bbfe2a2223.zip |
QUIC: removed explicit packet padding for certain frames.
The frames for which the padding is removed are PATH_CHALLENGE and
PATH_RESPONSE, which are sent separately by ngx_quic_frame_sendto().
Diffstat (limited to 'src')
-rw-r--r-- | src/event/quic/ngx_event_quic_output.c | 30 |
1 files changed, 1 insertions, 29 deletions
diff --git a/src/event/quic/ngx_event_quic_output.c b/src/event/quic/ngx_event_quic_output.c index 23235e235..392c7757b 100644 --- a/src/event/quic/ngx_event_quic_output.c +++ b/src/event/quic/ngx_event_quic_output.c @@ -525,7 +525,7 @@ ngx_quic_output_packet(ngx_connection_t *c, ngx_quic_send_ctx_t *ctx, ssize_t flen; ngx_str_t res; ngx_int_t rc; - ngx_uint_t nframes, expand; + ngx_uint_t nframes; ngx_msec_t now; ngx_queue_t *q; ngx_quic_frame_t *f; @@ -560,7 +560,6 @@ ngx_quic_output_packet(ngx_connection_t *c, ngx_quic_send_ctx_t *ctx, nframes = 0; p = src; len = 0; - expand = 0; for (q = ngx_queue_head(&ctx->frames); q != ngx_queue_sentinel(&ctx->frames); @@ -568,33 +567,6 @@ ngx_quic_output_packet(ngx_connection_t *c, ngx_quic_send_ctx_t *ctx, { f = ngx_queue_data(q, ngx_quic_frame_t, queue); - if (!expand && (f->type == NGX_QUIC_FT_PATH_RESPONSE - || f->type == NGX_QUIC_FT_PATH_CHALLENGE)) - { - /* - * RFC 9000, 8.2.1. Initiating Path Validation - * - * An endpoint MUST expand datagrams that contain a - * PATH_CHALLENGE frame to at least the smallest allowed - * maximum datagram size of 1200 bytes... - * - * (same applies to PATH_RESPONSE frames) - */ - - if (max < 1200) { - /* expanded packet will not fit */ - break; - } - - if (min < 1200) { - min = 1200; - - min_payload = ngx_quic_payload_size(&pkt, min); - } - - expand = 1; - } - if (len >= max_payload) { break; } |