Blame SOURCES/0086-avoid-bio-memleak.patch

3da501
From 3d046c4d047a55123beeceffe9f8bae09159445e Mon Sep 17 00:00:00 2001
3da501
From: yangyangtiantianlonglong <yangtianlong1224@163.com>
3da501
Date: Wed, 19 Jan 2022 11:19:52 +0800
3da501
Subject: [PATCH] Fix the same BIO_FLAGS macro definition
3da501
3da501
Also add comment to the public header to avoid
3da501
making another conflict in future.
3da501
3da501
Fixes #17545
3da501
3da501
Reviewed-by: Paul Dale <pauli@openssl.org>
3da501
Reviewed-by: Tomas Mraz <tomas@openssl.org>
3da501
(Merged from https://github.com/openssl/openssl/pull/17546)
3da501
3da501
(cherry picked from commit e278f18563dd3dd67c00200ee30402f48023c6ef)
3da501
---
3da501
 include/internal/bio.h   | 2 +-
3da501
 include/openssl/bio.h.in | 2 ++
3da501
 2 files changed, 3 insertions(+), 1 deletion(-)
3da501
3da501
diff --git a/include/internal/bio.h b/include/internal/bio.h
3da501
index 2d36a7b980f2..02f7222ab4f1 100644
3da501
--- a/include/internal/bio.h
3da501
+++ b/include/internal/bio.h
3da501
@@ -48,9 +48,9 @@ int bread_conv(BIO *bio, char *data, size_t datal, size_t *read);
3da501
  * BIO_FLAGS_KTLS_TX_CTRL_MSG means we are about to send a ctrl message next.
3da501
  * BIO_FLAGS_KTLS_RX means we are using ktls with this BIO for receiving.
3da501
  */
3da501
-# define BIO_FLAGS_KTLS_TX          0x800
3da501
 # define BIO_FLAGS_KTLS_TX_CTRL_MSG 0x1000
3da501
 # define BIO_FLAGS_KTLS_RX          0x2000
3da501
+# define BIO_FLAGS_KTLS_TX          0x4000
3da501
 
3da501
 /* KTLS related controls and flags */
3da501
 # define BIO_set_ktls_flag(b, is_tx) \
3da501
diff --git a/include/openssl/bio.h.in b/include/openssl/bio.h.in
3da501
index 2c65b7e1a79b..686dad3099b7 100644
3da501
--- a/include/openssl/bio.h.in
3da501
+++ b/include/openssl/bio.h.in
3da501
@@ -209,6 +209,8 @@ extern "C" {
3da501
 # define BIO_FLAGS_NONCLEAR_RST  0x400
3da501
 # define BIO_FLAGS_IN_EOF        0x800
3da501
 
3da501
+/* the BIO FLAGS values 0x1000 to 0x4000 are reserved for internal KTLS flags */
3da501
+
3da501
 typedef union bio_addr_st BIO_ADDR;
3da501
 typedef struct bio_addrinfo_st BIO_ADDRINFO;
3da501