Only reserves MP_ACK frames for paths that have received packets
@@ -162,10 +162,15 @@ protoop_arg_t schedule_frames(picoquic_cnx_t *cnx) {
for (int i = 0; i < bpfd->nb_proposed; i++) {
path_data_t *pdtmp = bpfd->paths[i];
if (pdtmp->state == path_active || pdtmp->state == path_unusable) {
+ picoquic_packet_context_t *pc = (picoquic_packet_context_t *) get_path(pdtmp->path, AK_PATH_PKT_CTX, picoquic_packet_context_application);
+ picoquic_sack_item_t* first_sack = (picoquic_sack_item_t *) get_pkt_ctx(pc, AK_PKTCTX_FIRST_SACK_ITEM);
+ uint64_t first_sack_start_range = (uint64_t) get_sack_item(first_sack, AK_SACKITEM_START_RANGE);
+ if (first_sack_start_range != (uint64_t)((int64_t)-1)) { // Don't reserve for path without activity
reserve_mp_ack_frame(cnx, pdtmp->path, picoquic_packet_context_application);
}
}
}
+ }
queue_t *reserved_frames = (queue_t *) get_cnx(cnx, AK_CNX_RESERVED_FRAMES, 0);
if (queue_peek(reserved_frames) == NULL) {
