summaryrefslogtreecommitdiff
path: root/src/lib/libssl/dtls_locl.h
diff options
context:
space:
mode:
authorjsing <>2021-07-21 08:42:14 +0000
committerjsing <>2021-07-21 08:42:14 +0000
commit24017b25b6aa507cb8684a8f62c86469a7aa2c4d (patch)
treebae082e5c4f00caf24ddf7d2b8bb7f2636f17592 /src/lib/libssl/dtls_locl.h
parent79b1c4fd5d0d72bf2e38130064b797ecc99c1cbe (diff)
downloadopenbsd-24017b25b6aa507cb8684a8f62c86469a7aa2c4d.tar.gz
openbsd-24017b25b6aa507cb8684a8f62c86469a7aa2c4d.tar.bz2
openbsd-24017b25b6aa507cb8684a8f62c86469a7aa2c4d.zip
Remove DTLS processed_rcds queue.
When DTLS handshake records are received from the next epoch, we will potentially queue them on the unprocessed_rcds queue - this is usually a Finished message that has been received without the ChangeCipherSuite (CCS) message (which may have been dropped or reordered). After the epoch increments (due to the CCS being received), the current code processes all records on the unprocessed queue and immediate queues them on the processed queue, which dtls1_get_record() then pulls from. This form of processing only adds more complexity and another queue. Instead, once the epoch increments, pull a single record from the unprocessed queue and process it, allowing the contents to be consumed by the caller. We repeat this process until the unprocessed queue is empty, at which point we go back to consuming messages from the wire. ok inoguchi@ tb@
Diffstat (limited to '')
-rw-r--r--src/lib/libssl/dtls_locl.h5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/lib/libssl/dtls_locl.h b/src/lib/libssl/dtls_locl.h
index 9e0699d098..bc28ce8559 100644
--- a/src/lib/libssl/dtls_locl.h
+++ b/src/lib/libssl/dtls_locl.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: dtls_locl.h,v 1.2 2021/07/19 08:42:24 jsing Exp $ */ 1/* $OpenBSD: dtls_locl.h,v 1.3 2021/07/21 08:42:14 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.
@@ -151,9 +151,8 @@ typedef struct dtls1_state_internal_st {
151 151
152 unsigned short handshake_read_seq; 152 unsigned short handshake_read_seq;
153 153
154 /* Received handshake records (processed and unprocessed) */ 154 /* Received handshake records (unprocessed) */
155 record_pqueue unprocessed_rcds; 155 record_pqueue unprocessed_rcds;
156 record_pqueue processed_rcds;
157 156
158 /* Buffered handshake messages */ 157 /* Buffered handshake messages */
159 struct _pqueue *buffered_messages; 158 struct _pqueue *buffered_messages;