comparison src/event/ngx_event_quic.c @ 7864:eebdda507ec3 quic

Added tests for connection id lengths in initial packet.
author Vladimir Homutov <vl@nginx.com>
date Thu, 14 May 2020 14:49:28 +0300
parents 81f85c479d7e
children a9cc1627cf1c
comparison
equal deleted inserted replaced
7863:81f85c479d7e 7864:eebdda507ec3
577 577
578 if (ngx_quic_parse_initial_header(pkt) != NGX_OK) { 578 if (ngx_quic_parse_initial_header(pkt) != NGX_OK) {
579 return NGX_ERROR; 579 return NGX_ERROR;
580 } 580 }
581 581
582 if (pkt->dcid.len < NGX_QUIC_CID_LEN_MIN) {
583 /* 7.2. Negotiating Connection IDs */
584 ngx_log_error(NGX_LOG_INFO, c->log, 0,
585 "quic too short dcid in initial packet: length %i",
586 pkt->dcid.len);
587 return NGX_ERROR;
588 }
589
582 c->log->action = "creating new quic connection"; 590 c->log->action = "creating new quic connection";
583 591
584 qc = ngx_pcalloc(c->pool, sizeof(ngx_quic_connection_t)); 592 qc = ngx_pcalloc(c->pool, sizeof(ngx_quic_connection_t));
585 if (qc == NULL) { 593 if (qc == NULL) {
586 return NGX_ERROR; 594 return NGX_ERROR;