diff --git a/include/openssl/dtls1.h b/include/openssl/dtls1.h index 2069aedb..ac097ce7 100644 --- a/include/openssl/dtls1.h +++ b/include/openssl/dtls1.h @@ -103,11 +103,12 @@ typedef struct timeval OPENSSL_timeval; typedef struct dtls1_bitmap_st { - unsigned long map; /* track 32 packets on 32-bit systems - and 64 - on 64-bit systems */ - unsigned char max_seq_num[8]; /* max record number seen so far, - 64-bit value in big-endian - encoding */ + /* map is a bit mask of the last 64 sequence numbers. Bit + * |1<= sizeof(bitmap->map)*8) return 0; /* stale, outside the window */ - else if (bitmap->map & (1UL<map & (((uint64_t) 1) << shift)) return 0; /* record previously received */ memcpy (s->s3->rrec.seq_num,seq,8); @@ -1479,7 +1479,7 @@ static void dtls1_record_bitmap_update(SSL *s, DTLS1_BITMAP *bitmap) else { shift = -cmp; if (shift < sizeof(bitmap->map)*8) - bitmap->map |= 1UL<map |= ((uint64_t) 1) << shift; } }