You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@rocketmq.apache.org by GitBox <gi...@apache.org> on 2019/05/23 13:02:19 UTC

[GitHub] [rocketmq] dut-xiayuan commented on a change in pull request #1177: [ISSUE #1057]Filter out docker0 when finding a local address

dut-xiayuan commented on a change in pull request #1177: [ISSUE #1057]Filter out docker0 when finding a local address
URL: https://github.com/apache/rocketmq/pull/1177#discussion_r286930494
 
 

 ##########
 File path: remoting/src/main/java/org/apache/rocketmq/remoting/common/RemotingUtil.java
 ##########
 @@ -99,6 +99,10 @@ public static String getLocalAddress() {
             ArrayList<String> ipv6Result = new ArrayList<String>();
             while (enumeration.hasMoreElements()) {
                 final NetworkInterface networkInterface = enumeration.nextElement();
+                if ("docker0".equals(networkInterface.getName())) {
 
 Review comment:
   Hi, we can read the sysfs directory to check if the interface is a bridge. This method is also used in some bridge tools, such as `brctl`, in fact, I was inspired by this tool.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services