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

Alan M. Carroll commented on TS-2530:
-------------------------------------

I think the basic idea is fine, but I have just a few little code structure 
comments --

1) Use ink_strlcpy() instead of strcpy.

2) Also, don't do the lookback check first, more like

{code}
if (!ats_is_ip(ifip)) spot_type = NA;
else if ((IFF_LOOPBACK & ifflags) || ats_is_ip_loopback(ifip)) spot_type = LO;
{code}

If it's not a valid address it can't go in the list regardless of the interface 
type.

> False positive detected for Multi-Hop cycle when using private IP
> -----------------------------------------------------------------
>
>                 Key: TS-2530
>                 URL: https://issues.apache.org/jira/browse/TS-2530
>             Project: Traffic Server
>          Issue Type: Bug
>          Components: Core
>            Reporter: Ron Barber
>         Attachments: TS-2530.patch
>
>
> With hosts A and B running ATS where both hosts have private IPs (10.0.0.1 & 
> 10.0.0.2) AND have a local loopback which have a public IP 27.1.1.1 we are 
> getting HTTP/1.1 400 Multi-Hop Cycle Detected when host A forwards a request 
> to host B.
> ATS searches the incoming Via header for its own ip address 
> (Machine::instance()->ip_hex_string) to determine if the request has been 
> forwarded back to itself.
> Cause: ATS is selecting the public IP address of the server to insert in the 
> Via header (even if it's not on a routable interface).



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)

Reply via email to