diff options
Diffstat (limited to 'ssl/quic/quic_wire.c')
-rw-r--r-- | ssl/quic/quic_wire.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/ssl/quic/quic_wire.c b/ssl/quic/quic_wire.c index 7df32c77b2..937d16e1c8 100644 --- a/ssl/quic/quic_wire.c +++ b/ssl/quic/quic_wire.c @@ -15,6 +15,18 @@ OSSL_SAFE_MATH_UNSIGNED(uint64_t, uint64_t) +int ossl_quic_frame_ack_contains_pn(const OSSL_QUIC_FRAME_ACK *ack, QUIC_PN pn) +{ + size_t i; + + for (i = 0; i < ack->num_ack_ranges; ++i) + if (pn >= ack->ack_ranges[i].start + && pn <= ack->ack_ranges[i].end) + return 1; + + return 0; +} + /* * QUIC Wire Format Encoding * ========================= |