diff src/event/quic/ngx_event_quic.c @ 8710:44b4c6180106 quic

QUIC: multiple versions support. Draft-29 and beyond are now supported simultaneously, no need to recompile.
author Sergey Kandaurov <pluknet@nginx.com>
date Fri, 19 Feb 2021 17:27:19 +0300
parents 81bb3a690c10
children 0a0b1de9ccab
line wrap: on
line diff
--- a/src/event/quic/ngx_event_quic.c
+++ b/src/event/quic/ngx_event_quic.c
@@ -1234,7 +1234,8 @@ ngx_quic_new_connection(ngx_connection_t
 
     qc->server_seqnum = NGX_QUIC_UNSET_PN;
 
-    if (ngx_quic_keys_set_initial_secret(c->pool, qc->keys, &pkt->dcid)
+    if (ngx_quic_keys_set_initial_secret(c->pool, qc->keys, &pkt->dcid,
+                                         qc->version)
         != NGX_OK)
     {
         return NULL;
@@ -2611,7 +2612,8 @@ ngx_quic_send_early_cc(ngx_connection_t 
         return NGX_ERROR;
     }
 
-    if (ngx_quic_keys_set_initial_secret(c->pool, pkt.keys, &inpkt->dcid)
+    if (ngx_quic_keys_set_initial_secret(c->pool, pkt.keys, &inpkt->dcid,
+                                         inpkt->version)
         != NGX_OK)
     {
         return NGX_ERROR;