[ 
https://issues.apache.org/jira/browse/TS-2157?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14600151#comment-14600151
 ] 

ASF GitHub Bot commented on TS-2157:
------------------------------------

Github user SolidWallOfCode commented on a diff in the pull request:

    https://github.com/apache/trafficserver/pull/182#discussion_r33196590
  
    --- Diff: proxy/http/HttpSM.cc ---
    @@ -4622,16 +4623,16 @@ HttpSM::do_http_server_open(bool raw)
       ink_assert(pending_action == NULL);
     
       if (false == t_state.api_server_addr_set) {
    -    ink_assert(t_state.current.server->port > 0);
    -    t_state.current.server->addr.port() = 
htons(t_state.current.server->port);
    +    ink_assert(t_state.current.server->dst_addr.port() > 0);
    +    t_state.current.server->dst_addr.port() = 
htons(t_state.current.server->dst_addr.port());
    --- End diff --
    
    This will flip the byte order which seems like a bad idea. In the previous 
state the separate port was stored in host order and this was needed to flip it 
to network order to be used in the `IpEndpoint`.


> Replace "addr" with appropriate "src_addr" and "dst_addr" in 
> ConnectionAttributes
> ---------------------------------------------------------------------------------
>
>                 Key: TS-2157
>                 URL: https://issues.apache.org/jira/browse/TS-2157
>             Project: Traffic Server
>          Issue Type: New Feature
>          Components: Network
>            Reporter: Leif Hedstrom
>            Assignee: Eric Schwartz
>             Fix For: 6.1.0
>
>
> This would more clearly let us encapsulate the two endpoint's (IpEndpoint) 
> for each connection. In addition, we ought to be able to remove the "port" 
> member from ConnectionAttributes as well, and its convoluted and overloaded 
> semantics. The appropriate IpEndpoint (src_addr or dst_addr) would hold the 
> port information as necessary.



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

Reply via email to