comparison 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
comparison
equal deleted inserted replaced
8984:a7b789e2be27 8985:da24a78720eb
671 671
672 static void 672 static void
673 ngx_quic_init_packet(ngx_connection_t *c, ngx_quic_send_ctx_t *ctx, 673 ngx_quic_init_packet(ngx_connection_t *c, ngx_quic_send_ctx_t *ctx,
674 ngx_quic_header_t *pkt, ngx_quic_path_t *path) 674 ngx_quic_header_t *pkt, ngx_quic_path_t *path)
675 { 675 {
676 ngx_quic_socket_t *qsock;
677 ngx_quic_connection_t *qc; 676 ngx_quic_connection_t *qc;
678 677
679 qc = ngx_quic_get_connection(c); 678 qc = ngx_quic_get_connection(c);
680
681 qsock = ngx_quic_get_socket(c);
682 679
683 ngx_memzero(pkt, sizeof(ngx_quic_header_t)); 680 ngx_memzero(pkt, sizeof(ngx_quic_header_t));
684 681
685 pkt->flags = NGX_QUIC_PKT_FIXED_BIT; 682 pkt->flags = NGX_QUIC_PKT_FIXED_BIT;
686 683
697 } 694 }
698 695
699 pkt->dcid.data = path->cid->id; 696 pkt->dcid.data = path->cid->id;
700 pkt->dcid.len = path->cid->len; 697 pkt->dcid.len = path->cid->len;
701 698
702 pkt->scid.data = qsock->sid.id; 699 pkt->scid = qc->tp.initial_scid;
703 pkt->scid.len = qsock->sid.len;
704 700
705 pkt->version = qc->version; 701 pkt->version = qc->version;
706 pkt->log = c->log; 702 pkt->log = c->log;
707 pkt->level = ctx->level; 703 pkt->level = ctx->level;
708 704