Mercurial > hg > nginx-quic
diff src/event/ngx_event_quic.h @ 7931:9fe7875ce4bb quic
QUIC: further limiting maximum QUIC packet size.
quic-transport draft 29, section 14:
QUIC depends upon a minimum IP packet size of at least 1280 bytes.
This is the IPv6 minimum size [RFC8200] and is also supported by most
modern IPv4 networks. Assuming the minimum IP header size, this
results in a QUIC maximum packet size of 1232 bytes for IPv6 and 1252
bytes for IPv4.
Since the packet size can change during connection lifetime, the
ngx_quic_max_udp_payload() function is introduced that currently
returns minimal allowed size, depending on address family.
author | Vladimir Homutov <vl@nginx.com> |
---|---|
date | Tue, 16 Jun 2020 11:54:05 +0300 |
parents | 391d06a51bc0 |
children | a2c34e77cfc1 |
line wrap: on
line diff
--- a/src/event/ngx_event_quic.h +++ b/src/event/ngx_event_quic.h @@ -23,7 +23,8 @@ /* 1 flags + 4 version + 2 x (1 + 20) s/dcid + 4 pn + 4 len + token len */ #define NGX_QUIC_MAX_UDP_PAYLOAD_SIZE 65527 -#define NGX_QUIC_MAX_UDP_PAYLOAD_OUT 1300 /* TODO */ +#define NGX_QUIC_MAX_UDP_PAYLOAD_OUT 1252 +#define NGX_QUIC_MAX_UDP_PAYLOAD_OUT6 1232 #define NGX_QUIC_DEFAULT_ACK_DELAY_EXPONENT 3 #define NGX_QUIC_DEFAULT_MAX_ACK_DELAY 25