changeset 8593:d8a0bb1e85bf quic

QUIC: simplified ngx_quic_create_long_header(). As seen in the quic-transport draft, which this implementation follows: Initial packets sent by the server MUST set the Token Length field to zero.
author Sergey Kandaurov <pluknet@nginx.com>
date Wed, 21 Oct 2020 12:03:22 +0100
parents f948945c1a1c
children ee06a813756c
files src/event/ngx_event_quic_transport.c
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/event/ngx_event_quic_transport.c
+++ b/src/event/ngx_event_quic_transport.c
@@ -433,7 +433,7 @@ ngx_quic_create_long_header(ngx_quic_hea
     p = ngx_cpymem(p, pkt->scid.data, pkt->scid.len);
 
     if (pkt->level == ssl_encryption_initial) {
-        ngx_quic_build_int(&p, pkt->token.len);
+        ngx_quic_build_int(&p, 0);
     }
 
     ngx_quic_build_int(&p, pkt_len + pkt->num_len);