From: Dmytro Podgornyi Date: Wed, 12 Jan 2022 17:25:23 +0000 (+0200) Subject: ssl/t1_enc: Fix kTLS RX offload path X-Git-Tag: openssl-3.2.0-alpha1~3068 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d73a7a3a71270aaadb4e4e678ae9bd3cef8b9cbd;p=thirdparty%2Fopenssl.git ssl/t1_enc: Fix kTLS RX offload path During counting of the unprocessed records, return code is treated in a wrong way. This forces kTLS RX path to be skipped in case of presence of unprocessed records. CLA: trivial Reviewed-by: Tomas Mraz Reviewed-by: Matt Caswell Reviewed-by: Paul Dale (Merged from https://github.com/openssl/openssl/pull/17492) --- diff --git a/ssl/t1_enc.c b/ssl/t1_enc.c index 51688d4f2ea..101cba64909 100644 --- a/ssl/t1_enc.c +++ b/ssl/t1_enc.c @@ -122,7 +122,7 @@ static int count_unprocessed_records(SSL *s) return -1; /* Read until next record */ - if (PACKET_get_length_prefixed_2(&pkt, &subpkt)) + if (!PACKET_get_length_prefixed_2(&pkt, &subpkt)) return -1; count += 1;