diff src/event/ngx_event_quic_protection.c @ 8265:d45325e90221 quic

Limit output QUIC packets with client max_packet_size. Additionally, receive larger packets than 512 bytes.
author Roman Arutyunyan <arut@nginx.com>
date Mon, 23 Mar 2020 18:47:17 +0300
parents c217a907ce42
children f85749b60e58
line wrap: on
line diff
--- a/src/event/ngx_event_quic_protection.c	Mon Mar 23 18:20:42 2020 +0300
+++ b/src/event/ngx_event_quic_protection.c	Mon Mar 23 18:47:17 2020 +0300
@@ -697,7 +697,7 @@
 
     out.len = payload->len + EVP_GCM_TLS_TAG_LEN;
 
-    ad.data = ngx_alloc(346 /*max header*/, log);
+    ad.data = ngx_alloc(NGX_QUIC_MAX_LONG_HEADER, log);
     if (ad.data == 0) {
         return NGX_ERROR;
     }
@@ -766,7 +766,7 @@
 
     out.len = payload->len + EVP_GCM_TLS_TAG_LEN;
 
-    ad.data = ngx_alloc(25 /*max header*/, log);
+    ad.data = ngx_alloc(NGX_QUIC_MAX_SHORT_HEADER, log);
     if (ad.data == 0) {
         return NGX_ERROR;
     }