You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by zw...@apache.org on 2021/03/29 19:09:03 UTC
[trafficserver] branch 9.1.x updated: Fix
HttpSessionManager::acquireSession from previous rebase error (#7631)
This is an automated email from the ASF dual-hosted git repository.
zwoop pushed a commit to branch 9.1.x
in repository https://gitbox.apache.org/repos/asf/trafficserver.git
The following commit(s) were added to refs/heads/9.1.x by this push:
new a527e96 Fix HttpSessionManager::acquireSession from previous rebase error (#7631)
a527e96 is described below
commit a527e96b70791572d827bfea8e9398fb92b84880
Author: Susan Hinrichs <sh...@verizonmedia.com>
AuthorDate: Mon Mar 29 12:07:30 2021 -0500
Fix HttpSessionManager::acquireSession from previous rebase error (#7631)
(cherry picked from commit 2333388855a6cdcdacc86eb6b1528dcb58fd66b8)
---
proxy/http/HttpSessionManager.cc | 18 ++++++++----------
1 file changed, 8 insertions(+), 10 deletions(-)
diff --git a/proxy/http/HttpSessionManager.cc b/proxy/http/HttpSessionManager.cc
index c4aa296..2cee24e 100644
--- a/proxy/http/HttpSessionManager.cc
+++ b/proxy/http/HttpSessionManager.cc
@@ -147,19 +147,17 @@ ServerSessionPool::acquireSession(sockaddr const *addr, CryptoHash const &hostna
to_return = nullptr;
if ((TS_SERVER_SESSION_SHARING_MATCH_MASK_HOSTONLY & match_style) && !(TS_SERVER_SESSION_SHARING_MATCH_MASK_IP & match_style)) {
+ Debug("http_ss", "Search for host name only not IP. Pool size %" PRId64, m_fqdn_pool.count());
// This is broken out because only in this case do we check the host hash first. The range must be checked
// to verify an upstream that matches port and SNI name is selected. Walk backwards to select oldest.
in_port_t port = ats_ip_port_cast(addr);
- FQDNTable::iterator first, last;
- // FreeBSD/clang++ bug workaround: explicit cast to super type to make overload work. Not needed on Fedora27 nor gcc.
- // Not fixed on FreeBSD as of llvm 6.0.1.
- std::tie(first, last) = static_cast<const decltype(m_fqdn_pool)::range::super_type &>(m_fqdn_pool.equal_range(hostname_hash));
- while (last != first) {
- --last;
- if (port == ats_ip_port_cast(last->get_remote_addr()) &&
- (!(match_style & TS_SERVER_SESSION_SHARING_MATCH_MASK_SNI) || validate_sni(sm, last->get_netvc())) &&
- (!(match_style & TS_SERVER_SESSION_SHARING_MATCH_MASK_HOSTSNISYNC) || validate_host_sni(sm, last->get_netvc())) &&
- (!(match_style & TS_SERVER_SESSION_SHARING_MATCH_MASK_CERT) || validate_cert(sm, last->get_netvc()))) {
+ auto first = m_fqdn_pool.find(hostname_hash);
+ while (first != m_fqdn_pool.end() && first->hostname_hash == hostname_hash) {
+ Debug("http_ss", "Compare port 0x%x against 0x%x", port, ats_ip_port_cast(first->get_remote_addr()));
+ if (port == ats_ip_port_cast(first->get_remote_addr()) &&
+ (!(match_style & TS_SERVER_SESSION_SHARING_MATCH_MASK_SNI) || validate_sni(sm, first->get_netvc())) &&
+ (!(match_style & TS_SERVER_SESSION_SHARING_MATCH_MASK_HOSTSNISYNC) || validate_host_sni(sm, first->get_netvc())) &&
+ (!(match_style & TS_SERVER_SESSION_SHARING_MATCH_MASK_CERT) || validate_cert(sm, first->get_netvc()))) {
zret = HSM_DONE;
break;
}