diff options
| author | Vladimir Homutov <vl@nginx.com> | 2020-04-20 12:12:17 +0300 |
|---|---|---|
| committer | Vladimir Homutov <vl@nginx.com> | 2020-04-20 12:12:17 +0300 |
| commit | 67aa3b91919096506b8504dc681264dd2f08fd0c (patch) | |
| tree | b2532c96d2058c5211d6b2ecf8558a5f370fab13 /src | |
| parent | fa264b46b13d4065341cf5cb578a9b0c6ed2b1d3 (diff) | |
| download | nginx-67aa3b91919096506b8504dc681264dd2f08fd0c.tar.gz nginx-67aa3b91919096506b8504dc681264dd2f08fd0c.tar.bz2 | |
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.
Diffstat (limited to 'src')
| -rw-r--r-- | src/event/ngx_event_quic.c | 4 | ||||
| -rw-r--r-- | src/event/ngx_event_quic_transport.c | 8 |
2 files changed, 6 insertions, 6 deletions
diff --git a/src/event/ngx_event_quic.c b/src/event/ngx_event_quic.c index 4c9a658a9..990c1ec14 100644 --- a/src/event/ngx_event_quic.c +++ b/src/event/ngx_event_quic.c @@ -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; diff --git a/src/event/ngx_event_quic_transport.c b/src/event/ngx_event_quic_transport.c index e291c1215..1a2cada35 100644 --- a/src/event/ngx_event_quic_transport.c +++ b/src/event/ngx_event_quic_transport.c @@ -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; |
