[ 
https://issues.apache.org/jira/browse/TS-4622?focusedWorklogId=25728&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-25728
 ]

ASF GitHub Bot logged work on TS-4622:
--------------------------------------

                Author: ASF GitHub Bot
            Created on: 20/Jul/16 00:22
            Start Date: 20/Jul/16 00:22
    Worklog Time Spent: 10m 
      Work Description: Github user JamesPeach commented on a diff in the pull 
request:

    https://github.com/apache/trafficserver/pull/773#discussion_r71447768
  
    --- Diff: proxy/http/HttpTransact.cc ---
    @@ -1783,7 +1783,13 @@ HttpTransact::OSDNSLookup(State *s)
       // update some state variables with hostdb information that has
       // been provided.
       ats_ip_copy(&s->server_info.dst_addr, s->host_db_info.ip());
    -  s->server_info.dst_addr.port() = 
htons(s->hdr_info.client_request.port_get()); // now we can set the port.
    +  // TODO ideally only if ports aren't defined in remap
    +  // If the SRV response has a port number, we should honor it. Otherwise 
we do the port defined in remap
    +  if (s->dns_info.srv_port) {
    +    s->server_info.dst_addr.port() = htons(s->dns_info.srv_port);
    +  } else {
    +    s->server_info.dst_addr.port() = 
htons(s->hdr_info.client_request.port_get()); // now we can set the port.
    +  }
    --- End diff --
    
    If a plugin used ``TSHttpTxnServerAddrSet()``, then at this point 
``dst_addr`` may be the address set by the plugin in which case we should not 
clobber it. However it is already being clobbered from the request URL, so 
maybe the cases I tested were already broken (I was using port 80 and 443).
    
    Setting the port from the SRV record should probably be conditional on 
``srv_lookup_success``.


Issue Time Tracking
-------------------

    Worklog Id:     (was: 25728)
    Time Spent: 50m  (was: 40m)

> Ports from SRV lookups aren't used
> ----------------------------------
>
>                 Key: TS-4622
>                 URL: https://issues.apache.org/jira/browse/TS-4622
>             Project: Traffic Server
>          Issue Type: Bug
>          Components: DNS
>            Reporter: Thomas Jackson
>            Assignee: Thomas Jackson
>             Fix For: 7.0.0
>
>          Time Spent: 50m
>  Remaining Estimate: 0h
>
> Although the dns processor parses out the ports and we keep track of them, it 
> seems that the port from the SRV response is not used at all when connecting 
> to the origin. Simple fix, we simply need to set the port before doing 
> `do_http_server_open` (potentially earlier if we want to let plugins etc. 
> override the port?)



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to