diff options
| author | Sergey Kandaurov <pluknet@nginx.com> | 2020-11-17 21:32:04 +0000 |
|---|---|---|
| committer | Sergey Kandaurov <pluknet@nginx.com> | 2020-11-17 21:32:04 +0000 |
| commit | 5e32d82dea03e25c472f8549afe167d827104100 (patch) | |
| tree | 1c340df4849e0a853d7002a751cfb3d347001540 /src/event/ngx_event_quic.c | |
| parent | b1d930b8931d7789cc528b873065d938c781a92b (diff) | |
| download | nginx-5e32d82dea03e25c472f8549afe167d827104100.tar.gz nginx-5e32d82dea03e25c472f8549afe167d827104100.tar.bz2 | |
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.
Diffstat (limited to '')
| -rw-r--r-- | src/event/ngx_event_quic.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/event/ngx_event_quic.c b/src/event/ngx_event_quic.c index 5ef8df977..a11300407 100644 --- 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 *c, ngx_quic_conf_t *conf, 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) { |
