MEDIUM: quic: implement a retransmit limit per frame
authorAmaury Denoyelle <adenoyelle@haproxy.com>
Fri, 27 Jan 2023 16:54:15 +0000 (17:54 +0100)
committerAmaury Denoyelle <adenoyelle@haproxy.com>
Fri, 3 Feb 2023 10:56:42 +0000 (11:56 +0100)
commite4abb1f2da6e70e79fe71fae5c762696dcc549b8
tree4123722e3a821daf00eb6dd65580fddbd705c37a
parent57b3eaa79365a6cc6c951bf44348d313cef785ce
MEDIUM: quic: implement a retransmit limit per frame

Add a <loss_count> new field in quic_frame structure. This field is set
to 0 and incremented each time a sent packet is declared lost. If
<loss_count> reached a hard-coded limit, the connection is deemed as
failing and is closed immediately with a CONNECTION_CLOSE using
INTERNAL_ERROR.

By default, limit is set to 10. This should ensure that overall memory
usage is limited if a peer behaves incorrectly.

This should be backported up to 2.7.
include/haproxy/quic_conn-t.h
include/haproxy/quic_frame-t.h
include/haproxy/quic_frame.h
src/quic_conn.c