Skip to content

Commit

Permalink
When requeueing deferred URXEs retain the order
Browse files Browse the repository at this point in the history
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 #22452)
  • Loading branch information
mattcaswell committed Oct 24, 2023
1 parent acf9512 commit 86e11b1
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 15 deletions.
2 changes: 1 addition & 1 deletion ssl/quic/quic_record_rx.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}

Expand Down
14 changes: 7 additions & 7 deletions test/recipes/75-test_quicapi_data/ssltraceref-zlib.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
14 changes: 7 additions & 7 deletions test/recipes/75-test_quicapi_data/ssltraceref.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 86e11b1

Please sign in to comment.