Skip to content

Commit 9a1a786

Browse files
cschombuericcarlschwartz
authored andcommitted
TS-4070: RemapProcessor Forward Mapping w/ Recv Port failing w/ TS-2157 changes.
This closes apache#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. Conflicts: lib/luajit
1 parent b2aebe3 commit 9a1a786

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

proxy/http/remap/RemapProcessor.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,8 +87,8 @@ RemapProcessor::setup_for_remap(HttpTransact::State *s)
8787
Debug("url_rewrite", "[lookup] attempting %s lookup", proxy_request ? "proxy" : "normal");
8888

8989
if (rewrite_table->num_rules_forward_with_recv_port) {
90-
Debug("url_rewrite", "[lookup] forward mappings with recv port found; Using recv port %d", s->client_info.src_addr.port());
91-
if (rewrite_table->forwardMappingWithRecvPortLookup(request_url, s->client_info.src_addr.host_order_port(), request_host,
90+
Debug("url_rewrite", "[lookup] forward mappings with recv port found; Using recv port %d", s->client_info.dst_addr.port());
91+
if (rewrite_table->forwardMappingWithRecvPortLookup(request_url, s->client_info.dst_addr.port(), request_host,
9292
request_host_len, s->url_map)) {
9393
Debug("url_rewrite", "Found forward mapping with recv port");
9494
mapping_found = true;

0 commit comments

Comments
 (0)