]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MINOR: quic: Missing acknowledgments for trailing packets
authorFrédéric Lécaille <flecaille@haproxy.com>
Tue, 21 Jun 2022 13:14:59 +0000 (15:14 +0200)
committerFrédéric Lécaille <flecaille@haproxy.com>
Wed, 22 Jun 2022 13:47:52 +0000 (15:47 +0200)
commit77ac6f5667fd83b6790fef626b8ff77d985afba5
tree5b66fd9bb487f0c6ce1277a850af3269775eb7af
parent1bad7db4a146e91cc2e9db72a92935ce9df5d24a
BUG/MINOR: quic: Missing acknowledgments for trailing packets

This bug was revealed by key_update QUIC tracker test. During this test,
after the handshake has succeeded, the client sends a 1-RTT packet containing
only a PING frame. On our side, we do not acknowledge it, because we have
no ack-eliciting packet to send. This is not correct. We must acknowledge all
the ack-eliciting packets unconditionally. But we must not send too much
ACK frames: every two packets since we have sent an ACK frame. This is the test
(nb_aepkts_since_last_ack >= QUIC_MAX_RX_AEPKTS_SINCE_LAST_ACK) which ensure
this is the case. But this condition must be checked at the very last time,
when we are building a packet and when an acknowledgment is required. This
is not to qc_may_build_pkt() to do that. This boolean function decides if
we have packets to send. It must return "true" if there is no more ack-eliciting
packets to send and if an acknowledgement is required.

We must also add a "force_ack" parameter to qc_build_pkt() to force the
acknowledments during the handshakes (for each packet). If not, they will
be sent every two packets. This parameter must be passed to qc_do_build_pkt()
and be checked alongside the others conditions when building a packet to
decide to add an ACK frame or not to this packet.

Must be backported to 2.6.
src/xprt_quic.c