shinrich commented on a change in pull request #7622:
URL: https://github.com/apache/trafficserver/pull/7622#discussion_r602577589
##########
File path: proxy/http/HttpSessionManager.cc
##########
@@ -147,28 +149,33 @@ 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()))) {
Review comment:
I think these changes are due to a rebase error in a previous commit. I
set up PR #7631 to track. That should definitely land independent of these
changes.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]