40ac027697730f50e390811a37e60098cd48b2cc
[vpp.git] / build / external / patches / quicly_0.0.5-vpp / 0002-quicly-rtt-time-skew.patch
1 diff --git a/lib/quicly.c b/lib/quicly.c
2 index 95d5f13..200515f 100644
3 --- a/lib/quicly.c
4 +++ b/lib/quicly.c
5 @@ -3551,6 +3551,10 @@ static int handle_ack_frame(quicly_conn_t *conn, struct st_quicly_handle_payload
6  
7      QUICLY_PROBE(QUICTRACE_RECV_ACK_DELAY, conn, probe_now(), frame.ack_delay);
8  
9 +    /* Detect and fix time skew */
10 +    if (now < largest_newly_acked.sent_at)
11 +        now = largest_newly_acked.sent_at;
12 +
13      /* Update loss detection engine on ack. The function uses ack_delay only when the largest_newly_acked is also the largest acked
14       * so far. So, it does not matter if the ack_delay being passed in does not apply to the largest_newly_acked. */
15      quicly_loss_on_ack_received(&conn->egress.loss, largest_newly_acked.packet_number, now, largest_newly_acked.sent_at,