diff src/event/quic/ngx_event_quic_output.c @ 8985: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 d8865baab732
children e00295b76395
line wrap: on
line diff
--- 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;