]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MINOR: quic: Amplification limit handling sanitization.
authorFrédéric Lécaille <flecaille@haproxy.com>
Fri, 4 Aug 2023 13:10:56 +0000 (15:10 +0200)
committerFrédéric Lécaille <flecaille@haproxy.com>
Mon, 7 Aug 2023 16:57:45 +0000 (18:57 +0200)
commita45f90dd4e2bf65da2b04a78117100534e43c321
tree2a8d755c8a707f578475802268eb00579f0c194c
parent1f40b6c9fe0051865828b8ada4f6845b6f2ad8e8
MINOR: quic: Amplification limit handling sanitization.

Add a BUG_ON() to quic_peer_validated_addr() to check the amplification limit
is respected when it return false(0), i.e. when the connection is not validated.

Implement quic_may_send_bytes() which returns the number of bytes which may be
sent when the connection has not already been validated and call this functions
at several places when this is the case (after having called
quic_peer_validated_addr()).

Furthermore, this patch improves the code maintainability. Some patches to
come will have to rename ->[rt]x.bytes quic_conn struct members.
include/haproxy/quic_conn.h
src/quic_conn.c
src/quic_tx.c