mirror of
https://github.com/apache/rocketmq.git
synced 2026-09-19 02:23:24 +08:00
This commit is contained in:
@@ -517,8 +517,10 @@ public class UtilAll {
|
||||
//10.0.0.0~10.255.255.255
|
||||
//172.16.0.0~172.31.255.255
|
||||
//192.168.0.0~192.168.255.255
|
||||
//127.0.0.0~127.255.255.255
|
||||
if (ip[0] == (byte) 10) {
|
||||
|
||||
return true;
|
||||
} else if (ip[0] == (byte) 127) {
|
||||
return true;
|
||||
} else if (ip[0] == (byte) 172) {
|
||||
if (ip[1] >= (byte) 16 && ip[1] <= (byte) 31) {
|
||||
@@ -604,7 +606,7 @@ public class UtilAll {
|
||||
if (ipCheck(ipByte)) {
|
||||
if (!isInternalIP(ipByte)) {
|
||||
return ipByte;
|
||||
} else if (internalIP == null) {
|
||||
} else if (internalIP == null || internalIP[0] == (byte) 127) {
|
||||
internalIP = ipByte;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user