You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@trafficserver.apache.org by "Yakov Kopel (Created) (JIRA)" <ji...@apache.org> on 2012/03/05 12:15:58 UTC

[jira] [Created] (TS-1127) Wrong assignment of incoming address

Wrong assignment of incoming address
------------------------------------

                 Key: TS-1127
                 URL: https://issues.apache.org/jira/browse/TS-1127
             Project: Traffic Server
          Issue Type: Bug
          Components: HTTP
    Affects Versions: 3.1.2
            Reporter: Yakov Kopel
             Fix For: 3.1.4


In HttpSM.cc file (attach_client_session) there are two lines:
  ink_inet_copy(&t_state.client_info.addr, netvc->get_remote_addr());
  t_state.client_info.port = netvc->get_local_port();

instead of:
  ink_inet_copy(&t_state.client_info.addr, netvc->get_local_addr());
  t_state.client_info.port = netvc->get_local_port();



--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (TS-1127) Wrong returned value of incoming port address

Posted by "Leif Hedstrom (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/TS-1127?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13258703#comment-13258703 ] 

Leif Hedstrom commented on TS-1127:
-----------------------------------

Fwiw, this is a deprecated API (which is why the regressions missed it).
                
> Wrong returned value of incoming port address
> ---------------------------------------------
>
>                 Key: TS-1127
>                 URL: https://issues.apache.org/jira/browse/TS-1127
>             Project: Traffic Server
>          Issue Type: Bug
>          Components: HTTP
>    Affects Versions: 3.1.2
>            Reporter: Yakov Kopel
>            Assignee: Leif Hedstrom
>             Fix For: 3.1.4
>
>         Attachments: fix.patch
>
>   Original Estimate: 1m
>  Remaining Estimate: 1m
>
> The API TSHttpTxnClientIncomingPortGet has been changed in Wed Oct 5 19:14:07 2011 (TS-926) and it returns another value.
> in the old version it returned the incoming port of the TS(the port which the client connected to the TS).
> in the new version the returned value is the sending port of the user.
> The different is in the line:
>   -  return sm->t_state.client_info.port;
>   +  return ink_inet_get_port(&sm->t_state.client_info.addr);
> The assignment of those two members (port, addr) are in the HttpSM.cc file
>   ink_inet_copy(&t_state.client_info.addr, netvc->get_remote_addr());
>   t_state.client_info.port = netvc->get_local_port();
>   
> The old code gave the right answer from the port member,  and the new one gives us wrong answer from the remote address.
> I attached a patch to fix this returned value.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (TS-1127) Wrong assignment of incoming address

Posted by "Yakov Kopel (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/TS-1127?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Yakov Kopel updated TS-1127:
----------------------------

    Attachment: fix.patch
    
> Wrong assignment of incoming address
> ------------------------------------
>
>                 Key: TS-1127
>                 URL: https://issues.apache.org/jira/browse/TS-1127
>             Project: Traffic Server
>          Issue Type: Bug
>          Components: HTTP
>    Affects Versions: 3.1.2
>            Reporter: Yakov Kopel
>             Fix For: 3.1.4
>
>         Attachments: fix.patch
>
>   Original Estimate: 1m
>  Remaining Estimate: 1m
>
> In HttpSM.cc file (attach_client_session) there are two lines:
>   ink_inet_copy(&t_state.client_info.addr, netvc->get_remote_addr());
>   t_state.client_info.port = netvc->get_local_port();
> instead of:
>   ink_inet_copy(&t_state.client_info.addr, netvc->get_local_addr());
>   t_state.client_info.port = netvc->get_local_port();

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (TS-1127) Wrong returned value of incoming port address

Posted by "Yakov Kopel (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/TS-1127?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Yakov Kopel updated TS-1127:
----------------------------

    Summary: Wrong returned value of incoming port address  (was: Wrong assignment of incoming address)
    
> Wrong returned value of incoming port address
> ---------------------------------------------
>
>                 Key: TS-1127
>                 URL: https://issues.apache.org/jira/browse/TS-1127
>             Project: Traffic Server
>          Issue Type: Bug
>          Components: HTTP
>    Affects Versions: 3.1.2
>            Reporter: Yakov Kopel
>             Fix For: 3.1.4
>
>         Attachments: fix.patch, fix.patch
>
>   Original Estimate: 1m
>  Remaining Estimate: 1m
>
> The API TSHttpTxnClientIncomingPortGet has been changed in Wed Oct 5 19:14:07 2011 (TS-926) and it returns another value.
> in the old version it returned the incoming port of the TS(the port which the client connected to the TS).
> in the new version the returned value is the sending port of the user.
> The different is in the line:
>   -  return sm->t_state.client_info.port;
>   +  return ink_inet_get_port(&sm->t_state.client_info.addr);
> The assignment of those two members (port, addr) are in the HttpSM.cc file
>   ink_inet_copy(&t_state.client_info.addr, netvc->get_remote_addr());
>   t_state.client_info.port = netvc->get_local_port();
>   
> The old code gave the right answer from the port member,  and the new one gives us wrong answer from the remote address.
> I attached a patch to fix this returned value.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (TS-1127) Wrong assignment of incoming address

Posted by "Yakov Kopel (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/TS-1127?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Yakov Kopel updated TS-1127:
----------------------------

    Description: 
The API TSHttpTxnClientIncomingPortGet has been changed in Wed Oct 5 19:14:07 2011 (TS-926) and it returns another value.
in the old version it returned the incoming port of the TS(the port which the client connected to the TS).
in the new version the returned value is the sending port of the user.
The different is in the line:
  -  return sm->t_state.client_info.port;
  +  return ink_inet_get_port(&sm->t_state.client_info.addr);

The assignment of those two members (port, addr) are in the HttpSM.cc file

  ink_inet_copy(&t_state.client_info.addr, netvc->get_remote_addr());
  t_state.client_info.port = netvc->get_local_port();
  
The old code gave the right answer from the port member,  and the new one gives us wrong answer from the remote address.

I attached a patch to fix this returned value.

  was:
There is a problem in the new version of trafficserverin the function (HttpSM.cc):
TSHttpTxnClientIncomingPortGet

The old code:
return sm->t_state.client_info.port
The new code:
return ink_inet_get_port(&sm->t_state.client_info.addr);

The assignment of those two members (port, addr) are in the HttpSM.cc file
(in attach_client_session function):

  ink_inet_copy(&t_state.client_info.addr, netvc->get_remote_addr());
  t_state.client_info.port = netvc->get_local_port();
  
the old code gave the right answer from the port member,  and the new one gives us wrong answer fron the remote addr.
I thought to fix it by rewrite the code get_remote_addr => get_local_addr
(as in the patch that I attached to here)
But it makes bugs in other places (redirect to another address).

Or maybe it will be better to rewrite the TSHttpTxnClientIncomingPortGet function to the old version.



    
> Wrong assignment of incoming address
> ------------------------------------
>
>                 Key: TS-1127
>                 URL: https://issues.apache.org/jira/browse/TS-1127
>             Project: Traffic Server
>          Issue Type: Bug
>          Components: HTTP
>    Affects Versions: 3.1.2
>            Reporter: Yakov Kopel
>             Fix For: 3.1.4
>
>         Attachments: fix.patch, fix.patch
>
>   Original Estimate: 1m
>  Remaining Estimate: 1m
>
> The API TSHttpTxnClientIncomingPortGet has been changed in Wed Oct 5 19:14:07 2011 (TS-926) and it returns another value.
> in the old version it returned the incoming port of the TS(the port which the client connected to the TS).
> in the new version the returned value is the sending port of the user.
> The different is in the line:
>   -  return sm->t_state.client_info.port;
>   +  return ink_inet_get_port(&sm->t_state.client_info.addr);
> The assignment of those two members (port, addr) are in the HttpSM.cc file
>   ink_inet_copy(&t_state.client_info.addr, netvc->get_remote_addr());
>   t_state.client_info.port = netvc->get_local_port();
>   
> The old code gave the right answer from the port member,  and the new one gives us wrong answer from the remote address.
> I attached a patch to fix this returned value.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Assigned] (TS-1127) Wrong returned value of incoming port address

Posted by "Leif Hedstrom (Assigned) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/TS-1127?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Leif Hedstrom reassigned TS-1127:
---------------------------------

    Assignee: Alan M. Carroll
    
> Wrong returned value of incoming port address
> ---------------------------------------------
>
>                 Key: TS-1127
>                 URL: https://issues.apache.org/jira/browse/TS-1127
>             Project: Traffic Server
>          Issue Type: Bug
>          Components: HTTP
>    Affects Versions: 3.1.2
>            Reporter: Yakov Kopel
>            Assignee: Alan M. Carroll
>             Fix For: 3.1.3
>
>         Attachments: fix.patch
>
>   Original Estimate: 1m
>  Remaining Estimate: 1m
>
> The API TSHttpTxnClientIncomingPortGet has been changed in Wed Oct 5 19:14:07 2011 (TS-926) and it returns another value.
> in the old version it returned the incoming port of the TS(the port which the client connected to the TS).
> in the new version the returned value is the sending port of the user.
> The different is in the line:
>   -  return sm->t_state.client_info.port;
>   +  return ink_inet_get_port(&sm->t_state.client_info.addr);
> The assignment of those two members (port, addr) are in the HttpSM.cc file
>   ink_inet_copy(&t_state.client_info.addr, netvc->get_remote_addr());
>   t_state.client_info.port = netvc->get_local_port();
>   
> The old code gave the right answer from the port member,  and the new one gives us wrong answer from the remote address.
> I attached a patch to fix this returned value.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (TS-1127) Wrong returned value of incoming port address

Posted by "Yakov Kopel (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/TS-1127?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Yakov Kopel updated TS-1127:
----------------------------

    Attachment:     (was: fix.patch)
    
> Wrong returned value of incoming port address
> ---------------------------------------------
>
>                 Key: TS-1127
>                 URL: https://issues.apache.org/jira/browse/TS-1127
>             Project: Traffic Server
>          Issue Type: Bug
>          Components: HTTP
>    Affects Versions: 3.1.2
>            Reporter: Yakov Kopel
>             Fix For: 3.1.4
>
>         Attachments: fix.patch
>
>   Original Estimate: 1m
>  Remaining Estimate: 1m
>
> The API TSHttpTxnClientIncomingPortGet has been changed in Wed Oct 5 19:14:07 2011 (TS-926) and it returns another value.
> in the old version it returned the incoming port of the TS(the port which the client connected to the TS).
> in the new version the returned value is the sending port of the user.
> The different is in the line:
>   -  return sm->t_state.client_info.port;
>   +  return ink_inet_get_port(&sm->t_state.client_info.addr);
> The assignment of those two members (port, addr) are in the HttpSM.cc file
>   ink_inet_copy(&t_state.client_info.addr, netvc->get_remote_addr());
>   t_state.client_info.port = netvc->get_local_port();
>   
> The old code gave the right answer from the port member,  and the new one gives us wrong answer from the remote address.
> I attached a patch to fix this returned value.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (TS-1127) Wrong returned value of incoming port address

Posted by "Leif Hedstrom (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/TS-1127?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Leif Hedstrom updated TS-1127:
------------------------------

    Fix Version/s:     (was: 3.1.3)
                   3.1.4
    
> Wrong returned value of incoming port address
> ---------------------------------------------
>
>                 Key: TS-1127
>                 URL: https://issues.apache.org/jira/browse/TS-1127
>             Project: Traffic Server
>          Issue Type: Bug
>          Components: HTTP
>    Affects Versions: 3.1.2
>            Reporter: Yakov Kopel
>            Assignee: Alan M. Carroll
>             Fix For: 3.1.4
>
>         Attachments: fix.patch
>
>   Original Estimate: 1m
>  Remaining Estimate: 1m
>
> The API TSHttpTxnClientIncomingPortGet has been changed in Wed Oct 5 19:14:07 2011 (TS-926) and it returns another value.
> in the old version it returned the incoming port of the TS(the port which the client connected to the TS).
> in the new version the returned value is the sending port of the user.
> The different is in the line:
>   -  return sm->t_state.client_info.port;
>   +  return ink_inet_get_port(&sm->t_state.client_info.addr);
> The assignment of those two members (port, addr) are in the HttpSM.cc file
>   ink_inet_copy(&t_state.client_info.addr, netvc->get_remote_addr());
>   t_state.client_info.port = netvc->get_local_port();
>   
> The old code gave the right answer from the port member,  and the new one gives us wrong answer from the remote address.
> I attached a patch to fix this returned value.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (TS-1127) Wrong returned value of incoming port address

Posted by "Leif Hedstrom (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/TS-1127?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Leif Hedstrom updated TS-1127:
------------------------------

    Fix Version/s:     (was: 3.1.4)
                   3.1.3

amc, can you take a look at this?
                
> Wrong returned value of incoming port address
> ---------------------------------------------
>
>                 Key: TS-1127
>                 URL: https://issues.apache.org/jira/browse/TS-1127
>             Project: Traffic Server
>          Issue Type: Bug
>          Components: HTTP
>    Affects Versions: 3.1.2
>            Reporter: Yakov Kopel
>             Fix For: 3.1.3
>
>         Attachments: fix.patch
>
>   Original Estimate: 1m
>  Remaining Estimate: 1m
>
> The API TSHttpTxnClientIncomingPortGet has been changed in Wed Oct 5 19:14:07 2011 (TS-926) and it returns another value.
> in the old version it returned the incoming port of the TS(the port which the client connected to the TS).
> in the new version the returned value is the sending port of the user.
> The different is in the line:
>   -  return sm->t_state.client_info.port;
>   +  return ink_inet_get_port(&sm->t_state.client_info.addr);
> The assignment of those two members (port, addr) are in the HttpSM.cc file
>   ink_inet_copy(&t_state.client_info.addr, netvc->get_remote_addr());
>   t_state.client_info.port = netvc->get_local_port();
>   
> The old code gave the right answer from the port member,  and the new one gives us wrong answer from the remote address.
> I attached a patch to fix this returned value.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (TS-1127) Wrong returned value of incoming port address

Posted by "Leif Hedstrom (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/TS-1127?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13258689#comment-13258689 ] 

Leif Hedstrom commented on TS-1127:
-----------------------------------

Taking this, reading the docs, and looking at the code, I'm 99% certain the proposed patch is correct.
                
> Wrong returned value of incoming port address
> ---------------------------------------------
>
>                 Key: TS-1127
>                 URL: https://issues.apache.org/jira/browse/TS-1127
>             Project: Traffic Server
>          Issue Type: Bug
>          Components: HTTP
>    Affects Versions: 3.1.2
>            Reporter: Yakov Kopel
>            Assignee: Leif Hedstrom
>             Fix For: 3.1.4
>
>         Attachments: fix.patch
>
>   Original Estimate: 1m
>  Remaining Estimate: 1m
>
> The API TSHttpTxnClientIncomingPortGet has been changed in Wed Oct 5 19:14:07 2011 (TS-926) and it returns another value.
> in the old version it returned the incoming port of the TS(the port which the client connected to the TS).
> in the new version the returned value is the sending port of the user.
> The different is in the line:
>   -  return sm->t_state.client_info.port;
>   +  return ink_inet_get_port(&sm->t_state.client_info.addr);
> The assignment of those two members (port, addr) are in the HttpSM.cc file
>   ink_inet_copy(&t_state.client_info.addr, netvc->get_remote_addr());
>   t_state.client_info.port = netvc->get_local_port();
>   
> The old code gave the right answer from the port member,  and the new one gives us wrong answer from the remote address.
> I attached a patch to fix this returned value.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Assigned] (TS-1127) Wrong returned value of incoming port address

Posted by "Leif Hedstrom (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/TS-1127?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Leif Hedstrom reassigned TS-1127:
---------------------------------

    Assignee: Leif Hedstrom  (was: Alan M. Carroll)
    
> Wrong returned value of incoming port address
> ---------------------------------------------
>
>                 Key: TS-1127
>                 URL: https://issues.apache.org/jira/browse/TS-1127
>             Project: Traffic Server
>          Issue Type: Bug
>          Components: HTTP
>    Affects Versions: 3.1.2
>            Reporter: Yakov Kopel
>            Assignee: Leif Hedstrom
>             Fix For: 3.1.4
>
>         Attachments: fix.patch
>
>   Original Estimate: 1m
>  Remaining Estimate: 1m
>
> The API TSHttpTxnClientIncomingPortGet has been changed in Wed Oct 5 19:14:07 2011 (TS-926) and it returns another value.
> in the old version it returned the incoming port of the TS(the port which the client connected to the TS).
> in the new version the returned value is the sending port of the user.
> The different is in the line:
>   -  return sm->t_state.client_info.port;
>   +  return ink_inet_get_port(&sm->t_state.client_info.addr);
> The assignment of those two members (port, addr) are in the HttpSM.cc file
>   ink_inet_copy(&t_state.client_info.addr, netvc->get_remote_addr());
>   t_state.client_info.port = netvc->get_local_port();
>   
> The old code gave the right answer from the port member,  and the new one gives us wrong answer from the remote address.
> I attached a patch to fix this returned value.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (TS-1127) Wrong assignment of incoming address

Posted by "Yakov Kopel (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/TS-1127?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Yakov Kopel updated TS-1127:
----------------------------

    Attachment: fix.patch
    
> Wrong assignment of incoming address
> ------------------------------------
>
>                 Key: TS-1127
>                 URL: https://issues.apache.org/jira/browse/TS-1127
>             Project: Traffic Server
>          Issue Type: Bug
>          Components: HTTP
>    Affects Versions: 3.1.2
>            Reporter: Yakov Kopel
>             Fix For: 3.1.4
>
>         Attachments: fix.patch, fix.patch
>
>   Original Estimate: 1m
>  Remaining Estimate: 1m
>
> The API TSHttpTxnClientIncomingPortGet has been changed in Wed Oct 5 19:14:07 2011 (TS-926) and it returns another value.
> in the old version it returned the incoming port of the TS(the port which the client connected to the TS).
> in the new version the returned value is the sending port of the user.
> The different is in the line:
>   -  return sm->t_state.client_info.port;
>   +  return ink_inet_get_port(&sm->t_state.client_info.addr);
> The assignment of those two members (port, addr) are in the HttpSM.cc file
>   ink_inet_copy(&t_state.client_info.addr, netvc->get_remote_addr());
>   t_state.client_info.port = netvc->get_local_port();
>   
> The old code gave the right answer from the port member,  and the new one gives us wrong answer from the remote address.
> I attached a patch to fix this returned value.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (TS-1127) Wrong assignment of incoming address

Posted by "Yakov Kopel (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/TS-1127?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Yakov Kopel updated TS-1127:
----------------------------

    Description: 
There is a problem in the new version of trafficserverin the function (HttpSM.cc):
TSHttpTxnClientIncomingPortGet

The old code:
return sm->t_state.client_info.port
The new code:
return ink_inet_get_port(&sm->t_state.client_info.addr);

The assignment of those two members (port, addr) are in the HttpSM.cc file
(in attach_client_session function):

  ink_inet_copy(&t_state.client_info.addr, netvc->get_remote_addr());
  t_state.client_info.port = netvc->get_local_port();
  
the old code gave the right answer from the port member,  and the new one gives us wrong answer fron the remote addr.
I thought to fix it by rewrite the code get_remote_addr => get_local_addr
(as in the patch that I attached to here)
But it makes bugs in other places (redirect to another address).

Or maybe it will be better to rewrite the TSHttpTxnClientIncomingPortGet function to the old version.



  was:
In HttpSM.cc file (attach_client_session) there are two lines:
  ink_inet_copy(&t_state.client_info.addr, netvc->get_remote_addr());
  t_state.client_info.port = netvc->get_local_port();

instead of:
  ink_inet_copy(&t_state.client_info.addr, netvc->get_local_addr());
  t_state.client_info.port = netvc->get_local_port();



    
> Wrong assignment of incoming address
> ------------------------------------
>
>                 Key: TS-1127
>                 URL: https://issues.apache.org/jira/browse/TS-1127
>             Project: Traffic Server
>          Issue Type: Bug
>          Components: HTTP
>    Affects Versions: 3.1.2
>            Reporter: Yakov Kopel
>             Fix For: 3.1.4
>
>         Attachments: fix.patch
>
>   Original Estimate: 1m
>  Remaining Estimate: 1m
>
> There is a problem in the new version of trafficserverin the function (HttpSM.cc):
> TSHttpTxnClientIncomingPortGet
> The old code:
> return sm->t_state.client_info.port
> The new code:
> return ink_inet_get_port(&sm->t_state.client_info.addr);
> The assignment of those two members (port, addr) are in the HttpSM.cc file
> (in attach_client_session function):
>   ink_inet_copy(&t_state.client_info.addr, netvc->get_remote_addr());
>   t_state.client_info.port = netvc->get_local_port();
>   
> the old code gave the right answer from the port member,  and the new one gives us wrong answer fron the remote addr.
> I thought to fix it by rewrite the code get_remote_addr => get_local_addr
> (as in the patch that I attached to here)
> But it makes bugs in other places (redirect to another address).
> Or maybe it will be better to rewrite the TSHttpTxnClientIncomingPortGet function to the old version.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira