Repository: trafficserver Updated Branches: refs/heads/6.0.x 5194f8301 -> e24062bde
Revert "TS-3237: Don't segregate DNS results by port." Fixes: TS-3720 (cherry picked from commit 6e33c64c18f93efc6921e0573f87da03251164ed) Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/e24062bd Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/e24062bd Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/e24062bd Branch: refs/heads/6.0.x Commit: e24062bde7be2137a43e64bceced70a54b35ea2b Parents: 5194f83 Author: Thomas Jackson <[email protected]> Authored: Wed Jul 1 11:35:10 2015 -0700 Committer: Bryan Call <[email protected]> Committed: Mon Jul 6 08:50:53 2015 -0700 ---------------------------------------------------------------------- proxy/http/HttpSM.cc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/trafficserver/blob/e24062bd/proxy/http/HttpSM.cc ---------------------------------------------------------------------- diff --git a/proxy/http/HttpSM.cc b/proxy/http/HttpSM.cc index 307a18f..0e37f22 100644 --- a/proxy/http/HttpSM.cc +++ b/proxy/http/HttpSM.cc @@ -3935,12 +3935,16 @@ HttpSM::do_hostdb_lookup() } else { /* we aren't using SRV stuff... */ DebugSM("http_seq", "[HttpSM::do_hostdb_lookup] Doing DNS Lookup"); + // If there is not a current server, we must be looking up the origin + // server at the beginning of the transaction + int server_port = t_state.current.server ? t_state.current.server->port : t_state.server_info.port; + if (t_state.api_txn_dns_timeout_value != -1) { DebugSM("http_timeout", "beginning DNS lookup. allowing %d mseconds for DNS lookup", t_state.api_txn_dns_timeout_value); } HostDBProcessor::Options opt; - + opt.port = server_port; opt.flags = (t_state.cache_info.directives.does_client_permit_dns_storing) ? HostDBProcessor::HOSTDB_DO_NOT_FORCE_DNS : HostDBProcessor::HOSTDB_FORCE_DNS_RELOAD; opt.timeout = (t_state.api_txn_dns_timeout_value != -1) ? t_state.api_txn_dns_timeout_value : 0;
