Skip to content

Commit c5656dd

Browse files
authored
check the network,Local site be the preferred one (#15189)
1 parent b85111e commit c5656dd

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

  • dubbo-common/src/main/java/org/apache/dubbo/common/utils

dubbo-common/src/main/java/org/apache/dubbo/common/utils/NetUtils.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -577,7 +577,11 @@ public static NetworkInterface findNetworkInterface() {
577577
if (addressOp.isPresent()) {
578578
try {
579579
if (addressOp.get().isReachable(100)) {
580-
return networkInterface;
580+
if (addressOp.get().isSiteLocalAddress()) {
581+
return networkInterface;
582+
} else {
583+
result = networkInterface;
584+
}
581585
}
582586
} catch (IOException e) {
583587
// ignore

0 commit comments

Comments
 (0)