1 Star 0 Fork 21

src-oepkgs-oE-rv/keepalived

forked from src-openEuler/keepalived 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
0008-ipvs-fix-a-file-descriptor-leak-with-SSL_GET.patch 1.46 KB
一键复制 编辑 原始数据 按行查看 历史
Randy.Wang 提交于 2021-06-10 09:41 . add upstream patches
From 48d398a186afb0c71eb2fc05328f4fed580f975e Mon Sep 17 00:00:00 2001
From: Quentin Armitage <quentin@armitage.org.uk>
Date: Wed, 28 Oct 2020 16:10:01 +0000
Subject: [PATCH 426/691] ipvs: fix a file descriptor leak with SSL_GET
Signed-off-by: Quentin Armitage <quentin@armitage.org.uk>
---
keepalived/check/check_ssl.c | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/keepalived/check/check_ssl.c b/keepalived/check/check_ssl.c
index c7fb2ca..2999244 100644
--- a/keepalived/check/check_ssl.c
+++ b/keepalived/check/check_ssl.c
@@ -301,8 +301,8 @@ ssl_read_thread(thread_ref_t thread)
if (req->error == SSL_ERROR_WANT_READ) {
/* async read unfinished */
thread_add_read(thread->master, ssl_read_thread, checker,
- thread->u.f.fd, timeout, false);
- } else if (r > 0 && req->error == 0) {
+ thread->u.f.fd, timeout, true);
+ } else if (r > 0 && req->error == SSL_ERROR_NONE) {
/* Handle response stream */
http_process_response(req, (size_t)r, url);
@@ -311,10 +311,9 @@ ssl_read_thread(thread_ref_t thread)
* Register itself to not perturbe global I/O multiplexer.
*/
thread_add_read(thread->master, ssl_read_thread, checker,
- thread->u.f.fd, timeout, false);
+ thread->u.f.fd, timeout, true);
} else if (req->error) {
-
- /* All the SSL streal has been parsed */
+ /* All the SSL stream has been parsed */
if (url->digest)
MD5_Final(digest, &req->context);
SSL_set_quiet_shutdown(req->ssl, 1);
--
1.8.3.1
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/src-oepkgs-oe-rv/keepalived.git
git@gitee.com:src-oepkgs-oe-rv/keepalived.git
src-oepkgs-oe-rv
keepalived
keepalived
master

搜索帮助