summaryrefslogtreecommitdiffstats
path: root/ssl/quic/quic_wire_pkt.c
diff options
context:
space:
mode:
authorHugo Landau <hlandau@openssl.org>2022-09-26 17:06:59 +0100
committerHugo Landau <hlandau@openssl.org>2022-11-24 08:15:20 +0000
commita73078b79fc6f229b95312dcb20e4f61120a108c (patch)
tree9a66c1046605081c484444eb7eeb5527c934bbe6 /ssl/quic/quic_wire_pkt.c
parentf5060f9b31654d7ca3b015d2b803e17dda760190 (diff)
QUIC TX Packetiser and Streams Mapper
Reviewed-by: Tomas Mraz <tomas@openssl.org> Reviewed-by: Paul Dale <pauli@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/19346)
Diffstat (limited to 'ssl/quic/quic_wire_pkt.c')
-rw-r--r--ssl/quic/quic_wire_pkt.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/ssl/quic/quic_wire_pkt.c b/ssl/quic/quic_wire_pkt.c
index b2bf90e7b6..a4fdc7bf53 100644
--- a/ssl/quic/quic_wire_pkt.c
+++ b/ssl/quic/quic_wire_pkt.c
@@ -583,11 +583,12 @@ int ossl_quic_wire_get_encoded_pkt_hdr_len(size_t short_conn_id_len,
enclen = ossl_quic_vlint_encode_len(hdr->token_len);
if (!enclen)
return 0;
- len += enclen;
+
+ len += enclen + hdr->token_len;
}
if (!ossl_quic_pkt_type_must_be_last(hdr->type)) {
- enclen = ossl_quic_vlint_encode_len(hdr->len);
+ enclen = ossl_quic_vlint_encode_len(hdr->len + hdr->pn_len);
if (!enclen)
return 0;