QUIC: fixed handling of initial source connection id.

This was broken in 1e2f4e9c8195.

While there, adjusted formatting of debug message with socket seqnum.
This commit is contained in:
Vladimir Homutov 2022-01-26 15:48:12 +03:00
parent af0552eb37
commit b3fd447923
2 changed files with 3 additions and 7 deletions

View File

@ -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;

View File

@ -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, ngx_quic_send_ctx_t *ctx,
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;