Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 10 additions & 10 deletions proxy/http/HttpSessionManager.cc
Original file line number Diff line number Diff line change
Expand Up @@ -155,11 +155,11 @@ ServerSessionPool::acquireSession(sockaddr const *addr, CryptoHash const &hostna
// 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_server_ip()) &&
(!(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()))) {
Http1ServerSession *curr = --last;
if (curr && (port == ats_ip_port_cast(curr->get_server_ip())) &&
(!(match_style & TS_SERVER_SESSION_SHARING_MATCH_MASK_SNI) || validate_sni(sm, curr->get_netvc())) &&
(!(match_style & TS_SERVER_SESSION_SHARING_MATCH_MASK_HOSTSNISYNC) || validate_host_sni(sm, curr->get_netvc())) &&
(!(match_style & TS_SERVER_SESSION_SHARING_MATCH_MASK_CERT) || validate_cert(sm, curr->get_netvc()))) {
zret = HSM_DONE;
break;
}
Expand All @@ -179,11 +179,11 @@ ServerSessionPool::acquireSession(sockaddr const *addr, CryptoHash const &hostna
// Note the port is matched as part of the address key so it doesn't need to be checked again.
if (match_style & (~TS_SERVER_SESSION_SHARING_MATCH_MASK_IP)) {
while (last != first) {
--last;
if ((!(match_style & TS_SERVER_SESSION_SHARING_MATCH_MASK_HOSTONLY) || last->hostname_hash == hostname_hash) &&
(!(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()))) {
Http1ServerSession *curr = --last;
if (curr && (!(match_style & TS_SERVER_SESSION_SHARING_MATCH_MASK_HOSTONLY) || curr->hostname_hash == hostname_hash) &&
(!(match_style & TS_SERVER_SESSION_SHARING_MATCH_MASK_SNI) || validate_sni(sm, curr->get_netvc())) &&
(!(match_style & TS_SERVER_SESSION_SHARING_MATCH_MASK_HOSTSNISYNC) || validate_host_sni(sm, curr->get_netvc())) &&
(!(match_style & TS_SERVER_SESSION_SHARING_MATCH_MASK_CERT) || validate_cert(sm, curr->get_netvc()))) {
zret = HSM_DONE;
break;
}
Expand Down