BUG/MINOR: quic: Too much reduced computed space to build handshake packets

Before this patch we reserved 16 bytes (QUIC_TLS_TAG_LEN) before building the
handshake packet to be sure to be able to add the tag which comes with the
the packet encryption, decreasing the end offset of the building buffer by 16 bytes.
But this tag length was taken into an account when calling qc_build_frms() which
computes and build crypto frames for the remaining available room thanks to <*len>
parameter which is the length of the already present bytes in the building buffer
before adding CRYPTO frames. This leaded us to waste the 16 last bytes of the buffer
which were not used.
This commit is contained in:
Frédéric Lécaille 2021-07-02 17:20:04 +02:00 committed by Amaury Denoyelle
parent 82d1daa268
commit ed9119f39e

View File

@ -3662,8 +3662,6 @@ static ssize_t qc_do_build_hdshk_pkt(struct q_buf *wbuf,
goto err;
}
/* Reserve enough room at the end of the packet for the AEAD TAG. */
end -= QUIC_TLS_TAG_LEN;
largest_acked_pn = qel->pktns->tx.largest_acked_pn;
/* packet number length */
*pn_len = quic_packet_number_length(pn, largest_acked_pn);