You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by am...@apache.org on 2015/12/28 20:55:07 UTC

trafficserver git commit: TS-4070: RemapProcessor Forward Mapping w/ Recv Port failing w/ TS-2157 changes. This closes #375.

Repository: trafficserver
Updated Branches:
  refs/heads/master e52f0606b -> 894ef7f85


TS-4070: RemapProcessor Forward Mapping w/ Recv Port failing w/ TS-2157 changes.
This closes #375.

During the rework of RemapProcessor.cc, RemapProcessor::setup_for_remap()
as part of the TS-2157 changeset, the port access API appears to have been
incorrectly modified to use the client_info.src_addr.host_order_port() API
[source port, host order] instead of the client_info.dst_addr.port()
[destination/receive port, network order] API. This caused port based
remapping based on the receive port to fail with ATS 6.0.0.


Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo
Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/894ef7f8
Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/894ef7f8
Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/894ef7f8

Branch: refs/heads/master
Commit: 894ef7f859772508331bdb610036baa9fafe81c6
Parents: e52f060
Author: Craig Schomburg <cr...@cisco.com>
Authored: Thu Dec 17 07:19:44 2015 -0500
Committer: Alan M. Carroll <am...@apache.org>
Committed: Mon Dec 28 13:54:33 2015 -0600

----------------------------------------------------------------------
 proxy/http/remap/RemapProcessor.cc | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/trafficserver/blob/894ef7f8/proxy/http/remap/RemapProcessor.cc
----------------------------------------------------------------------
diff --git a/proxy/http/remap/RemapProcessor.cc b/proxy/http/remap/RemapProcessor.cc
index 1c1e029..4040118 100644
--- a/proxy/http/remap/RemapProcessor.cc
+++ b/proxy/http/remap/RemapProcessor.cc
@@ -87,8 +87,8 @@ RemapProcessor::setup_for_remap(HttpTransact::State *s)
   Debug("url_rewrite", "[lookup] attempting %s lookup", proxy_request ? "proxy" : "normal");
 
   if (rewrite_table->num_rules_forward_with_recv_port) {
-    Debug("url_rewrite", "[lookup] forward mappings with recv port found; Using recv port %d", s->client_info.src_addr.port());
-    if (rewrite_table->forwardMappingWithRecvPortLookup(request_url, s->client_info.src_addr.host_order_port(), request_host,
+    Debug("url_rewrite", "[lookup] forward mappings with recv port found; Using recv port %d", s->client_info.dst_addr.port());
+    if (rewrite_table->forwardMappingWithRecvPortLookup(request_url, s->client_info.dst_addr.port(), request_host,
                                                         request_host_len, s->url_map)) {
       Debug("url_rewrite", "Found forward mapping with recv port");
       mapping_found = true;