mirror of
https://gitea.invidious.io/iv-org/litespeed-quic.git
synced 2024-08-15 00:53:43 +00:00
Release 1.19.6
- [BUGFIX] Ensure that Largest Observed does not decrease in ACKs we send. ACK frames placed in packets in buffered queues (optimization introduced in 1.17.15) can be preceded by an ACK frame generated later. In this case, the older ACK frame should not be sent out, as Chromium- based servers flags decrease in the ACK frame's Largest Observed value as an error.
This commit is contained in:
parent
03d03a4212
commit
428530e38e
5 changed files with 33 additions and 3 deletions
|
@ -980,7 +980,7 @@ full_conn_ci_write_ack (struct lsquic_conn *lconn,
|
|||
EV_LOG_GENERATED_ACK_FRAME(LSQUIC_LOG_CONN_ID, conn->fc_conn.cn_pf,
|
||||
packet_out->po_data + packet_out->po_data_sz, w);
|
||||
verify_ack_frame(conn, packet_out->po_data + packet_out->po_data_sz, w);
|
||||
lsquic_send_ctl_scheduled_ack(&conn->fc_send_ctl);
|
||||
lsquic_send_ctl_scheduled_ack(&conn->fc_send_ctl, packet_out->po_ack2ed);
|
||||
packet_out->po_frame_types |= 1 << QUIC_FRAME_ACK;
|
||||
lsquic_send_ctl_incr_pack_sz(&conn->fc_send_ctl, packet_out, w);
|
||||
packet_out->po_regen_sz += w;
|
||||
|
|
|
@ -1857,6 +1857,20 @@ lsquic_send_ctl_schedule_buffered (lsquic_send_ctl_t *ctl,
|
|||
while ((packet_out = TAILQ_FIRST(&packet_q->bpq_packets)) &&
|
||||
lsquic_send_ctl_can_send(ctl))
|
||||
{
|
||||
if ((packet_out->po_frame_types & QUIC_FTBIT_ACK)
|
||||
&& packet_out->po_ack2ed < ctl->sc_largest_acked)
|
||||
{
|
||||
LSQ_DEBUG("Remove out-of-order ACK from buffered packet");
|
||||
lsquic_packet_out_chop_regen(packet_out);
|
||||
if (packet_out->po_data_sz == 0)
|
||||
{
|
||||
LSQ_DEBUG("Dropping now-empty buffered packet");
|
||||
TAILQ_REMOVE(&packet_q->bpq_packets, packet_out, po_next);
|
||||
--packet_q->bpq_count;
|
||||
send_ctl_destroy_packet(ctl, packet_out);
|
||||
continue;
|
||||
}
|
||||
}
|
||||
if (bits != lsquic_packet_out_packno_bits(packet_out))
|
||||
{
|
||||
used = packno_bits2len(lsquic_packet_out_packno_bits(packet_out));
|
||||
|
|
|
@ -81,6 +81,12 @@ typedef struct lsquic_send_ctl {
|
|||
* else and it is not insanely long.)
|
||||
*/
|
||||
lsquic_packno_t sc_largest_ack2ed;
|
||||
/* sc_largest_acked is the largest packet number in PNS_APP packet number
|
||||
* space sent by peer for which we generated (not necessarily sent) an ACK.
|
||||
* This information is used to drop stale ACK frames from packets in
|
||||
* buffered queues.
|
||||
*/
|
||||
lsquic_packno_t sc_largest_acked;
|
||||
lsquic_time_t sc_loss_to;
|
||||
struct
|
||||
{
|
||||
|
@ -174,8 +180,9 @@ lsquic_send_ctl_reschedule_packets (lsquic_send_ctl_t *);
|
|||
|
||||
#define lsquic_send_ctl_lost_ack(ctl) ((ctl)->sc_flags & SC_LOST_ACK)
|
||||
|
||||
#define lsquic_send_ctl_scheduled_ack(ctl) do { \
|
||||
#define lsquic_send_ctl_scheduled_ack(ctl, packno) do { \
|
||||
(ctl)->sc_flags &= ~SC_LOST_ACK; \
|
||||
(ctl)->sc_largest_acked = packno; \
|
||||
} while (0)
|
||||
|
||||
void
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue