diff options
Diffstat (limited to 'src/lib/libssl/d1_pkt.c')
-rw-r--r-- | src/lib/libssl/d1_pkt.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/lib/libssl/d1_pkt.c b/src/lib/libssl/d1_pkt.c index 11735f0d2c..17be6dd182 100644 --- a/src/lib/libssl/d1_pkt.c +++ b/src/lib/libssl/d1_pkt.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: d1_pkt.c,v 1.98 2021/06/15 19:09:03 jsing Exp $ */ | 1 | /* $OpenBSD: d1_pkt.c,v 1.99 2021/06/19 17:21:39 jsing Exp $ */ |
2 | /* | 2 | /* |
3 | * DTLS implementation written by Nagendra Modadugu | 3 | * DTLS implementation written by Nagendra Modadugu |
4 | * (nagendra@cs.stanford.edu) for the OpenSSL project 2005. | 4 | * (nagendra@cs.stanford.edu) for the OpenSSL project 2005. |
@@ -1191,6 +1191,7 @@ dtls1_dispatch_alert(SSL *s) | |||
1191 | static DTLS1_BITMAP * | 1191 | static DTLS1_BITMAP * |
1192 | dtls1_get_bitmap(SSL *s, SSL3_RECORD_INTERNAL *rr, unsigned int *is_next_epoch) | 1192 | dtls1_get_bitmap(SSL *s, SSL3_RECORD_INTERNAL *rr, unsigned int *is_next_epoch) |
1193 | { | 1193 | { |
1194 | uint16_t next_epoch = D1I(s)->r_epoch + 1; | ||
1194 | 1195 | ||
1195 | *is_next_epoch = 0; | 1196 | *is_next_epoch = 0; |
1196 | 1197 | ||
@@ -1199,7 +1200,7 @@ dtls1_get_bitmap(SSL *s, SSL3_RECORD_INTERNAL *rr, unsigned int *is_next_epoch) | |||
1199 | return &D1I(s)->bitmap; | 1200 | return &D1I(s)->bitmap; |
1200 | 1201 | ||
1201 | /* Only HM and ALERT messages can be from the next epoch */ | 1202 | /* Only HM and ALERT messages can be from the next epoch */ |
1202 | else if (rr->epoch == (unsigned long)(D1I(s)->r_epoch + 1) && | 1203 | else if (rr->epoch == next_epoch && |
1203 | (rr->type == SSL3_RT_HANDSHAKE || rr->type == SSL3_RT_ALERT)) { | 1204 | (rr->type == SSL3_RT_HANDSHAKE || rr->type == SSL3_RT_ALERT)) { |
1204 | *is_next_epoch = 1; | 1205 | *is_next_epoch = 1; |
1205 | return &D1I(s)->next_bitmap; | 1206 | return &D1I(s)->next_bitmap; |