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_r287191657
 
 

 ##########
 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:
   more explantion:
   http://man7.org/linux/man-pages/man5/sysfs.5.html
   
https://unix.stackexchange.com/questions/40560/how-to-know-if-a-network-interface-is-tap-tun-bridge-or-physical
   https://github.com/Gandi/bridge-utils/blob/master/libbridge/libbridge_init.c

----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

Reply via email to