Mercurial > hg > nginx-quic
changeset 8820:da24a78720eb quic
QUIC: fixed handling of initial source connection id.
This was broken in 1e2f4e9c8195.
While there, adjusted formatting of debug message with socket seqnum.
author | Vladimir Homutov <vl@nginx.com> |
---|---|
date | Wed, 26 Jan 2022 15:48:12 +0300 |
parents | a7b789e2be27 |
children | 55359b950132 |
files | src/event/quic/ngx_event_quic_migration.c src/event/quic/ngx_event_quic_output.c |
diffstat | 2 files changed, 3 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/src/event/quic/ngx_event_quic_migration.c +++ b/src/event/quic/ngx_event_quic_migration.c @@ -346,8 +346,8 @@ update: path->received += len; ngx_log_debug3(NGX_LOG_DEBUG_EVENT, c->log, 0, - "quic packet len:%O via sock#%uL path#%uL", - len, qsock->sid.seqnum, path->seqnum); + "quic packet len:%O via sock#%L path#%uL", + len, (int64_t) qsock->sid.seqnum, path->seqnum); ngx_quic_path_dbg(c, "status", path); return NGX_OK;
--- a/src/event/quic/ngx_event_quic_output.c +++ b/src/event/quic/ngx_event_quic_output.c @@ -673,13 +673,10 @@ static void ngx_quic_init_packet(ngx_connection_t *c, ngx_quic_send_ctx_t *ctx, ngx_quic_header_t *pkt, ngx_quic_path_t *path) { - ngx_quic_socket_t *qsock; ngx_quic_connection_t *qc; qc = ngx_quic_get_connection(c); - qsock = ngx_quic_get_socket(c); - ngx_memzero(pkt, sizeof(ngx_quic_header_t)); pkt->flags = NGX_QUIC_PKT_FIXED_BIT; @@ -699,8 +696,7 @@ ngx_quic_init_packet(ngx_connection_t *c pkt->dcid.data = path->cid->id; pkt->dcid.len = path->cid->len; - pkt->scid.data = qsock->sid.id; - pkt->scid.len = qsock->sid.len; + pkt->scid = qc->tp.initial_scid; pkt->version = qc->version; pkt->log = c->log;