When requeueing deferred URXEs retain the order

If a URXE cannot be processed yet then we add it to the urx_deferred list.
Later, when they can be processed, we requeue them in the urx_pending list.

We must not reverse the order when doing so. We want to process the URXEs
in the order that they were received.

Reviewed-by: Hugo Landau <hlandau@openssl.org>
Reviewed-by: Paul Dale <pauli@openssl.org>
Reviewed-by: Todd Short <todd.short@me.com>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/22452)
This commit is contained in:
Matt Caswell 2023-10-20 12:33:25 +01:00
parent acf95129bc
commit 86e11b1e78
3 changed files with 15 additions and 15 deletions

View File

@ -280,7 +280,7 @@ static void qrx_requeue_deferred(OSSL_QRX *qrx)
while ((e = ossl_list_urxe_head(&qrx->urx_deferred)) != NULL) {
ossl_list_urxe_remove(&qrx->urx_deferred, e);
ossl_list_urxe_insert_head(&qrx->urx_pending, e);
ossl_list_urxe_insert_tail(&qrx->urx_pending, e);
}
}

View File

@ -127,21 +127,21 @@ Received Packet
Version: 0x00000001
Destination Conn Id: <zero length id>
Source Conn Id: 0x????????????????
Payload length: 213
Packet Number: 0x00000001
Payload length: 1042
Packet Number: 0x00000000
Received Packet
Packet Type: Handshake
Version: 0x00000001
Destination Conn Id: <zero length id>
Source Conn Id: 0x????????????????
Payload length: 1042
Packet Number: 0x00000000
Received Frame: Crypto
Offset: 1022
Len: 192
Payload length: 213
Packet Number: 0x00000001
Received Frame: Crypto
Offset: 0
Len: 1022
Received Frame: Crypto
Offset: 1022
Len: 192
Received TLS Record
Header:
Version = TLS 1.2 (0x303)

View File

@ -125,21 +125,21 @@ Received Packet
Version: 0x00000001
Destination Conn Id: <zero length id>
Source Conn Id: 0x????????????????
Payload length: 213
Packet Number: 0x00000001
Payload length: 1042
Packet Number: 0x00000000
Received Packet
Packet Type: Handshake
Version: 0x00000001
Destination Conn Id: <zero length id>
Source Conn Id: 0x????????????????
Payload length: 1042
Packet Number: 0x00000000
Received Frame: Crypto
Offset: 1022
Len: 192
Payload length: 213
Packet Number: 0x00000001
Received Frame: Crypto
Offset: 0
Len: 1022
Received Frame: Crypto
Offset: 1022
Len: 192
Received TLS Record
Header:
Version = TLS 1.2 (0x303)