From d230ee9311d084ffdf26d4c970e7b5dade552eb4 Mon Sep 17 00:00:00 2001 From: jsing <> Date: Tue, 11 Aug 2020 19:21:54 +0000 Subject: Increment the epoch in the same place for both read and write. ok inoguchi@ tb@ --- src/lib/libssl/d1_pkt.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/lib/libssl/d1_pkt.c b/src/lib/libssl/d1_pkt.c index 9ea694f605..4a6b3b7dcf 100644 --- a/src/lib/libssl/d1_pkt.c +++ b/src/lib/libssl/d1_pkt.c @@ -1,4 +1,4 @@ -/* $OpenBSD: d1_pkt.c,v 1.79 2020/08/11 19:13:35 jsing Exp $ */ +/* $OpenBSD: d1_pkt.c,v 1.80 2020/08/11 19:21:54 jsing Exp $ */ /* * DTLS implementation written by Nagendra Modadugu * (nagendra@cs.stanford.edu) for the OpenSSL project 2005. @@ -1427,14 +1427,14 @@ dtls1_reset_seq_numbers(SSL *s, int rw) unsigned int seq_bytes = sizeof(S3I(s)->read_sequence); if (rw & SSL3_CC_READ) { - seq = S3I(s)->read_sequence; D1I(s)->r_epoch++; + seq = S3I(s)->read_sequence; memcpy(&(D1I(s)->bitmap), &(D1I(s)->next_bitmap), sizeof(DTLS1_BITMAP)); memset(&(D1I(s)->next_bitmap), 0, sizeof(DTLS1_BITMAP)); } else { + D1I(s)->w_epoch++; seq = S3I(s)->write_sequence; memcpy(D1I(s)->last_write_sequence, seq, sizeof(S3I(s)->write_sequence)); - D1I(s)->w_epoch++; } memset(seq, 0, seq_bytes); -- cgit v1.2.3-55-g6feb