This is an automated email from the ASF dual-hosted git repository.
zwoop pushed a commit to branch 9.0.x
in repository https://gitbox.apache.org/repos/asf/trafficserver.git
The following commit(s) were added to refs/heads/9.0.x by this push:
new 8a69d4c Preserve cert name through ssl vc migration (#6977)
8a69d4c is described below
commit 8a69d4c7b07bcb8dd01b39404900bfef11582077
Author: Susan Hinrichs <[email protected]>
AuthorDate: Mon Jul 13 08:45:58 2020 -0500
Preserve cert name through ssl vc migration (#6977)
(cherry picked from commit cf4631c81eae59c71d7c18d8e68020bfcf46350b)
---
iocore/net/UnixNetVConnection.cc | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/iocore/net/UnixNetVConnection.cc b/iocore/net/UnixNetVConnection.cc
index 163b58f..b1d32b4 100644
--- a/iocore/net/UnixNetVConnection.cc
+++ b/iocore/net/UnixNetVConnection.cc
@@ -1394,8 +1394,9 @@ UnixNetVConnection::migrateToCurrentThread(Continuation
*cont, EThread *t)
hold_con.move(this->con);
SSLNetVConnection *sslvc = dynamic_cast<SSLNetVConnection *>(this);
- SSL *save_ssl = (sslvc) ? sslvc->ssl : nullptr;
- if (save_ssl) {
+ SSL *save_ssl = nullptr;
+ if (sslvc) {
+ save_ssl = sslvc->ssl;
SSLNetVCDetach(sslvc->ssl);
sslvc->ssl = nullptr;
}
@@ -1409,7 +1410,7 @@ UnixNetVConnection::migrateToCurrentThread(Continuation
*cont, EThread *t)
// Create new VC:
UnixNetVConnection *netvc = nullptr;
if (save_ssl) {
- SSLNetVConnection *sslvc = static_cast<SSLNetVConnection
*>(sslNetProcessor.allocate_vc(t));
+ sslvc = static_cast<SSLNetVConnection *>(sslNetProcessor.allocate_vc(t));
if (sslvc->populate(hold_con, cont, save_ssl) != EVENT_DONE) {
sslvc->do_io_close();
sslvc = nullptr;
@@ -1427,6 +1428,9 @@ UnixNetVConnection::migrateToCurrentThread(Continuation
*cont, EThread *t)
netvc->set_context(get_context());
}
}
+ if (netvc) {
+ netvc->options = this->options;
+ }
// Do not mark this closed until the end so it does not get freed by the
other thread too soon
this->do_io_close();
return netvc;