Removed source/destination swap from the function creating header.

The function now creates a header according to fileds provided in the "pkt"
argument without applying any logic regarding sending side.
This commit is contained in:
Vladimir Homutov 2020-04-20 12:12:17 +03:00
parent fa264b46b1
commit 67aa3b9191
2 changed files with 6 additions and 6 deletions

View File

@ -2233,8 +2233,8 @@ ngx_quic_send_frames(ngx_connection_t *c, ngx_queue_t *frames)
pkt.log = c->log;
pkt.level = start->level;
pkt.dcid = qc->dcid;
pkt.scid = qc->scid;
pkt.dcid = qc->scid;
pkt.scid = qc->dcid;
pkt.payload = out;
res.data = dst;

View File

@ -365,12 +365,12 @@ ngx_quic_create_long_header(ngx_quic_header_t *pkt, u_char *out,
p = ngx_quic_write_uint32(p, NGX_QUIC_VERSION);
*p++ = pkt->scid.len;
p = ngx_cpymem(p, pkt->scid.data, pkt->scid.len);
*p++ = pkt->dcid.len;
p = ngx_cpymem(p, pkt->dcid.data, pkt->dcid.len);
*p++ = pkt->scid.len;
p = ngx_cpymem(p, pkt->scid.data, pkt->scid.len);
if (pkt->level == ssl_encryption_initial) {
ngx_quic_build_int(&p, pkt->token.len);
}
@ -408,7 +408,7 @@ ngx_quic_create_short_header(ngx_quic_header_t *pkt, u_char *out,
*p++ = pkt->flags;
p = ngx_cpymem(p, pkt->scid.data, pkt->scid.len);
p = ngx_cpymem(p, pkt->dcid.data, pkt->dcid.len);
*pnp = p;