comparison 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
comparison
equal deleted inserted replaced
8709:81bb3a690c10 8710:44b4c6180106
1232 qc->nclient_ids++; 1232 qc->nclient_ids++;
1233 qc->client_seqnum = 0; 1233 qc->client_seqnum = 0;
1234 1234
1235 qc->server_seqnum = NGX_QUIC_UNSET_PN; 1235 qc->server_seqnum = NGX_QUIC_UNSET_PN;
1236 1236
1237 if (ngx_quic_keys_set_initial_secret(c->pool, qc->keys, &pkt->dcid) 1237 if (ngx_quic_keys_set_initial_secret(c->pool, qc->keys, &pkt->dcid,
1238 qc->version)
1238 != NGX_OK) 1239 != NGX_OK)
1239 { 1240 {
1240 return NULL; 1241 return NULL;
1241 } 1242 }
1242 1243
2609 pkt.keys = ngx_quic_keys_new(c->pool); 2610 pkt.keys = ngx_quic_keys_new(c->pool);
2610 if (pkt.keys == NULL) { 2611 if (pkt.keys == NULL) {
2611 return NGX_ERROR; 2612 return NGX_ERROR;
2612 } 2613 }
2613 2614
2614 if (ngx_quic_keys_set_initial_secret(c->pool, pkt.keys, &inpkt->dcid) 2615 if (ngx_quic_keys_set_initial_secret(c->pool, pkt.keys, &inpkt->dcid,
2616 inpkt->version)
2615 != NGX_OK) 2617 != NGX_OK)
2616 { 2618 {
2617 return NGX_ERROR; 2619 return NGX_ERROR;
2618 } 2620 }
2619 2621