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

ASF GitHub Bot logged work on ARTEMIS-4189:
-------------------------------------------

                Author: ASF GitHub Bot
            Created on: 01/Mar/23 11:12
            Start Date: 01/Mar/23 11:12
    Worklog Time Spent: 10m 
      Work Description: gemmellr commented on PR #4385:
URL: 
https://github.com/apache/activemq-artemis/pull/4385#issuecomment-1449911427

   I havent looked at the code yet, but have a more general wonder about this 
change.
   
   Not all that long ago we effectively made an opposite kind of change in the 
failover bits of qpid-jms to resolve an issue where its use of resolved IPs for 
hostnames actually broke things. We made it stop resolving failover hosts to 
their IPs for comparison and just use the hostname string values as given, 
because resolving them like it previously did meant it would often be de-duping 
away entirely distinct hostname values that all just happened to resolve to the 
same IP, which is a lot more common these days than when the original code was 
written, due to use of TLS SNI in general and specifically in cloud 
environments (e.g connections hitting some form of gateway that uses SNI to 
determine which 'host' is actually being connected to).




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

    Worklog Id:     (was: 848289)
    Time Spent: 40m  (was: 0.5h)

> NettyConnection.isSameTarget() should compare host names by IPs
> ---------------------------------------------------------------
>
>                 Key: ARTEMIS-4189
>                 URL: https://issues.apache.org/jira/browse/ARTEMIS-4189
>             Project: ActiveMQ Artemis
>          Issue Type: Bug
>          Components: Broker
>    Affects Versions: 2.28.0
>            Reporter: Howard Gao
>            Assignee: Howard Gao
>            Priority: Major
>          Time Spent: 40m
>  Remaining Estimate: 0h
>
> The method just compares the host names using string equals. However when one 
> host name is in IP form (like "10.7.2.2") it should try to resolve the 
> addresses of the host name and make sure they are equal if one of the IP 
> addresses matches. Otherwise it may return wrong comparison result.
> Also when comparing localhost it should take care of the case where the host 
> is absent from the transport configuration.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to