Repository: trafficserver Updated Branches: refs/heads/master b68887233 -> 6e33c64c1
Revert "TS-3237: Don't segregate DNS results by port." Fixes: TS-3720 Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/6e33c64c Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/6e33c64c Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/6e33c64c Branch: refs/heads/master Commit: 6e33c64c18f93efc6921e0573f87da03251164ed Parents: b688872 Author: Thomas Jackson <[email protected]> Authored: Wed Jul 1 11:35:10 2015 -0700 Committer: Thomas Jackson <[email protected]> Committed: Wed Jul 1 13:24:24 2015 -0700 ---------------------------------------------------------------------- proxy/http/HttpSM.cc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/trafficserver/blob/6e33c64c/proxy/http/HttpSM.cc ---------------------------------------------------------------------- diff --git a/proxy/http/HttpSM.cc b/proxy/http/HttpSM.cc index 082be26..1694e31 100644 --- a/proxy/http/HttpSM.cc +++ b/proxy/http/HttpSM.cc @@ -3943,12 +3943,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;
