[BUGFIX]DATAGRAM frame can't be retransmitted (#325)

This commit is contained in:
wangweiwei 2021-09-24 10:59:54 +08:00 committed by GitHub
parent 01c36b79df
commit 4026a4b616
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 5 deletions

View file

@ -248,6 +248,7 @@ extern const enum quic_ft_bit lsquic_legal_frames_by_level[][4];
/* Applies both to gQUIC and IETF QUIC, thus "B" for "both" */
#define BQUIC_FRAME_REGEN_MASK ((1 << QUIC_FRAME_ACK) \
| (1 << QUIC_FRAME_PATH_CHALLENGE) | (1 << QUIC_FRAME_PATH_RESPONSE) \
| (1 << QUIC_FRAME_STOP_WAITING) | (1 << QUIC_FRAME_TIMESTAMP))
| (1 << QUIC_FRAME_STOP_WAITING) | (1 << QUIC_FRAME_TIMESTAMP) \
| (1 << QUIC_FRAME_DATAGRAM))
#endif

View file

@ -373,9 +373,6 @@ lsquic_packet_out_chop_regen (lsquic_packet_out_t *packet_out)
frec->fe_off -= adj;
if (BQUIC_FRAME_REGEN_MASK & (1 << frec->fe_frame_type))
{
assert(frec->fe_off == 0); /* This checks that all the regen
frames are at the beginning of the packet. It can be removed
when this is no longer the case. */
adj += frec->fe_len;
memmove(packet_out->po_data + frec->fe_off,
packet_out->po_data + frec->fe_off + frec->fe_len,
@ -386,7 +383,6 @@ lsquic_packet_out_chop_regen (lsquic_packet_out_t *packet_out)
}
assert(adj); /* Otherwise why are we called? */
assert(packet_out->po_regen_sz == adj);
packet_out->po_regen_sz = 0;
packet_out->po_frame_types &= ~BQUIC_FRAME_REGEN_MASK;
}