diff src/event/ngx_event_quic_transport.c @ 8533:62b58f0a4711 quic

QUIC: discard incorrect packets instead of closing the connection. quic-transport 5.2: Packets that are matched to an existing connection are discarded if the packets are inconsistent with the state of that connection. 5.2.2: Servers MUST drop incoming packets under all other circumstances.
author Vladimir Homutov <vl@nginx.com>
date Tue, 01 Sep 2020 17:20:42 +0300
parents 4ff2a0b747d1
children 88676e7f4449
line wrap: on
line diff
--- a/src/event/ngx_event_quic_transport.c
+++ b/src/event/ngx_event_quic_transport.c
@@ -276,7 +276,7 @@ ngx_quic_parse_long_header(ngx_quic_head
 
     if (!(pkt->flags & NGX_QUIC_PKT_FIXED_BIT)) {
         ngx_log_error(NGX_LOG_INFO, pkt->log, 0, "quic fixed bit is not set");
-        return NGX_DECLINED;
+        return NGX_ERROR;
     }
 
     p = ngx_quic_read_uint8(p, end, &idlen);
@@ -491,7 +491,7 @@ ngx_quic_parse_short_header(ngx_quic_hea
 
     if (!(pkt->flags & NGX_QUIC_PKT_FIXED_BIT)) {
         ngx_log_error(NGX_LOG_INFO, pkt->log, 0, "quic fixed bit is not set");
-        return NGX_DECLINED;
+        return NGX_ERROR;
     }
 
     if (ngx_memcmp(p, dcid->data, dcid->len) != 0) {