comparison src/event/ngx_event_quic.c @ 7820:de715cdd4257 quic

Revert "Rejecting new connections with non-zero Initial packet." chrome-unstable 83.0.4103.7 starts with Initial packet number 1. I couldn't find a proper explanation besides this text in quic-transport: An endpoint MAY skip packet numbers when sending packets to detect this (Optimistic ACK Attack) behavior.
author Sergey Kandaurov <pluknet@nginx.com>
date Fri, 17 Apr 2020 12:01:45 +0300
parents efc0a65424e8
children e0abe17a2878
comparison
equal deleted inserted replaced
7819:76e8ec502c69 7820:de715cdd4257
581 581
582 if (ngx_quic_decrypt(pkt, NULL, &ctx->largest_pn) != NGX_OK) { 582 if (ngx_quic_decrypt(pkt, NULL, &ctx->largest_pn) != NGX_OK) {
583 return NGX_ERROR; 583 return NGX_ERROR;
584 } 584 }
585 585
586 if (pkt->pn != 0) {
587 ngx_log_error(NGX_LOG_INFO, c->log, 0,
588 "invalid initial packet number %L", pkt->pn);
589 return NGX_ERROR;
590 }
591
592 if (ngx_quic_init_connection(c) != NGX_OK) { 586 if (ngx_quic_init_connection(c) != NGX_OK) {
593 return NGX_ERROR; 587 return NGX_ERROR;
594 } 588 }
595 589
596 if (ngx_quic_payload_handler(c, pkt) != NGX_OK) { 590 if (ngx_quic_payload_handler(c, pkt) != NGX_OK) {