diff src/event/ngx_event_quic.c @ 8421:c206233d9c29 quic

Fixed transport parameters on a new connection with a valid token. Previously, the retry transport parameter was sent regardless.
author Sergey Kandaurov <pluknet@nginx.com>
date Mon, 01 Jun 2020 19:16:44 +0300
parents 6633f17044eb
children 90b02ff6b003
line wrap: on
line diff
--- a/src/event/ngx_event_quic.c
+++ b/src/event/ngx_event_quic.c
@@ -652,7 +652,9 @@ ngx_quic_new_connection(ngx_connection_t
         return NGX_ERROR;
     }
 
+#if (NGX_QUIC_DRAFT_VERSION >= 28)
     qc->tp.original_dcid = c->quic->odcid;
+#endif
     qc->tp.initial_scid = c->quic->dcid;
 
     qc->scid.len = pkt->scid.len;
@@ -796,6 +798,9 @@ ngx_quic_retry(ngx_connection_t *c)
     }
 
     c->quic->token = token;
+#if (NGX_QUIC_DRAFT_VERSION < 28)
+    c->quic->tp.original_dcid = c->quic->odcid;
+#endif
     c->quic->tp.retry_scid = c->quic->dcid;
     c->quic->in_retry = 1;