mirror of
https://github.com/nginx/nginx.git
synced 2025-01-19 18:13:01 +08:00
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:
parent
fa264b46b1
commit
67aa3b9191
@ -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;
|
||||
|
@ -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;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user