BUG/MINOR: quic: Wrong unit for ack delay for incoming ACK frames
This ACK frame field value is in microseconds. Everything is interpreted
and stored in milliseconds in our QUIC implementation.
diff --git a/include/haproxy/xprt_quic.h b/include/haproxy/xprt_quic.h
index 6ff29b4..6457fa4 100644
--- a/include/haproxy/xprt_quic.h
+++ b/include/haproxy/xprt_quic.h
@@ -467,13 +467,14 @@
return 1;
}
-/* Returns the <ack_delay> field value from <ack_frm> ACK frame for
- * <conn> QUIC connection.
+/* Returns the <ack_delay> field value in milliseconds from <ack_frm> ACK frame for
+ * <conn> QUIC connection. Note that the value of <ack_delay> coming from
+ * ACK frame is in microseconds.
*/
static inline unsigned int quic_ack_delay_ms(struct quic_ack *ack_frm,
struct quic_conn *conn)
{
- return ack_frm->ack_delay << conn->tx.params.ack_delay_exponent;
+ return (ack_frm->ack_delay << conn->tx.params.ack_delay_exponent) / 1000;
}
/* Initialize <dst> transport parameters with default values (when absent)