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

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

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

    https://github.com/apache/trafficserver/pull/773#discussion_r71536060
  
    --- 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 --
    
    I'll change the conditional-- that definitely makes sense.
    
    From looking at the API callout code-- it does seem like its already broken 
:/
    
    It seems that `TSHttpTxnServerAddrSet()` is called before the DNS lookup-- 
and if so it bypasses the [dns lookup| 
https://github.com/apache/trafficserver/blob/master/proxy/http/HttpSM.cc#L7179].
 So, I would think in this section of HttpTransact we would want to skip all 
port setting if `api_server_addr_set` is true.


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

    Worklog Id:     (was: 25754)
    Time Spent: 1h  (was: 50m)

> 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: 1h
>  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