diff options
author | Vladimir Homutov <vl@nginx.com> | 2022-01-26 15:48:12 +0300 |
---|---|---|
committer | Vladimir Homutov <vl@nginx.com> | 2022-01-26 15:48:12 +0300 |
commit | d5e71992c3431af3c97312f75057966cbd0eb68f (patch) | |
tree | 6ff08b8996e59aa0a028ad766cfa4e1ed939855f /src | |
parent | ede7dbe0070875cf93998a70fd2a3ceab21377da (diff) | |
download | nginx-d5e71992c3431af3c97312f75057966cbd0eb68f.tar.gz nginx-d5e71992c3431af3c97312f75057966cbd0eb68f.zip |
QUIC: fixed handling of initial source connection id.
This was broken in 1e2f4e9c8195.
While there, adjusted formatting of debug message with socket seqnum.
Diffstat (limited to 'src')
-rw-r--r-- | src/event/quic/ngx_event_quic_migration.c | 4 | ||||
-rw-r--r-- | src/event/quic/ngx_event_quic_output.c | 6 |
2 files changed, 3 insertions, 7 deletions
diff --git a/src/event/quic/ngx_event_quic_migration.c b/src/event/quic/ngx_event_quic_migration.c index d1a5cf7a0..ca43347eb 100644 --- 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; diff --git a/src/event/quic/ngx_event_quic_output.c b/src/event/quic/ngx_event_quic_output.c index 0f7eff26d..67e527462 100644 --- 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, 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; |