MINOR: quic: Increase the size of handshake RX UDP datagrams

Some browsers may send Initial packets with sizes greater than 1252 bytes
(QUIC_INITIAL_IPV4_MTU). Let us increase this size limit up to 2048 bytes.
Also use this size for "max_udp_payload_size" transport parameter to limit
the size of the datagrams we want to receive.
This commit is contained in:
Frédéric Lécaille 2021-10-22 15:04:27 +02:00 committed by Amaury Denoyelle
parent dbb0bb59e3
commit 46be7e92b4
2 changed files with 2 additions and 2 deletions

View File

@ -50,7 +50,7 @@ typedef unsigned long long ull;
#define QUIC_INITIAL_IPV6_MTU 1232 #define QUIC_INITIAL_IPV6_MTU 1232
/* XXX TO DO XXX */ /* XXX TO DO XXX */
/* Maximum packet length during handshake */ /* Maximum packet length during handshake */
#define QUIC_PACKET_MAXLEN QUIC_INITIAL_IPV4_MTU #define QUIC_PACKET_MAXLEN 2048
/* The minimum length of Initial packets. */ /* The minimum length of Initial packets. */
#define QUIC_INITIAL_PACKET_MINLEN 1200 #define QUIC_INITIAL_PACKET_MINLEN 1200

View File

@ -56,7 +56,7 @@
* before updating them with customized values. * before updating them with customized values.
*/ */
struct quic_transport_params quic_dflt_transport_params = { struct quic_transport_params quic_dflt_transport_params = {
.max_udp_payload_size = QUIC_DFLT_MAX_UDP_PAYLOAD_SIZE, .max_udp_payload_size = QUIC_PACKET_MAXLEN,
.ack_delay_exponent = QUIC_DFLT_ACK_DELAY_COMPONENT, .ack_delay_exponent = QUIC_DFLT_ACK_DELAY_COMPONENT,
.max_ack_delay = QUIC_DFLT_MAX_ACK_DELAY, .max_ack_delay = QUIC_DFLT_MAX_ACK_DELAY,
.active_connection_id_limit = QUIC_ACTIVE_CONNECTION_ID_LIMIT, .active_connection_id_limit = QUIC_ACTIVE_CONNECTION_ID_LIMIT,