You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by so...@apache.org on 2015/08/27 19:31:15 UTC
[8/9] trafficserver git commit: Revert "TS-3237: Don't segregate DNS
results by port."
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/7fb3f7fd
Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/7fb3f7fd
Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/7fb3f7fd
Branch: refs/heads/5.3.x
Commit: 7fb3f7fdf81b8dacf40230b3f647c60a1cfb29a9
Parents: a0c73ff
Author: Thomas Jackson <ja...@apache.org>
Authored: Wed Jul 1 11:35:10 2015 -0700
Committer: Phil Sorber <so...@apache.org>
Committed: Thu Aug 27 11:21:19 2015 -0600
----------------------------------------------------------------------
proxy/http/HttpSM.cc | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/7fb3f7fd/proxy/http/HttpSM.cc
----------------------------------------------------------------------
diff --git a/proxy/http/HttpSM.cc b/proxy/http/HttpSM.cc
index 096f2c5..0d40dd0 100644
--- a/proxy/http/HttpSM.cc
+++ b/proxy/http/HttpSM.cc
@@ -3985,12 +3985,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;