Mercurial > hg > nginx
diff src/event/ngx_event_quic.c @ 8641:fe53def49945 quic
QUIC: refactored long header parsing.
The largely duplicate type-specific functions ngx_quic_parse_initial_header(),
ngx_quic_parse_handshake_header(), and a missing one for 0-RTT, were merged.
The new order of functions listed in ngx_event_quic_transport.c reflects this.
|_ ngx_quic_parse_long_header - version-invariant long header fields
\_ ngx_quic_supported_version - a helper to decide we can go further
\_ ngx_quic_parse_long_header_v1 - QUICv1-specific long header fields
0-RTT packets previously appeared as Handshake are now logged as appropriate:
*1 quic packet rx long flags:db version:ff00001d
*1 quic packet rx early len:870
Logging SCID/DCID is no longer duplicated as were seen with Initial packets.
author | Sergey Kandaurov <pluknet@nginx.com> |
---|---|
date | Tue, 17 Nov 2020 21:32:04 +0000 |
parents | 9d28e9028aa5 |
children | 05b1ee464350 |
line wrap: on
line diff
--- a/src/event/ngx_event_quic.c +++ b/src/event/ngx_event_quic.c @@ -47,11 +47,6 @@ #define NGX_QUIC_MAX_ACK_GAP 2 -#define ngx_quic_level_name(lvl) \ - (lvl == ssl_encryption_application) ? "app" \ - : (lvl == ssl_encryption_initial) ? "init" \ - : (lvl == ssl_encryption_handshake) ? "hs" : "early" - typedef struct { ngx_rbtree_t tree; @@ -2086,6 +2081,10 @@ ngx_quic_process_packet(ngx_connection_t ngx_quic_hexdump(c->log, "quic packet rx scid", pkt->scid.data, pkt->scid.len); } + + if (pkt->level == ssl_encryption_initial) { + ngx_quic_hexdump(c->log, "quic token", pkt->token.data, pkt->token.len); + } #endif if (qc) {