Skip to content

Commit

Permalink
macos may have docker0 interface
Browse files Browse the repository at this point in the history
  • Loading branch information
sendaoYan committed Aug 21, 2024
1 parent 7c86f40 commit d5c3f69
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions test/lib/jdk/test/lib/NetworkConfiguration.java
Original file line number Diff line number Diff line change
Expand Up @@ -127,8 +127,8 @@ public static boolean isSameInterface(NetworkInterface ni1, NetworkInterface ni2

public static boolean isTestable(NetworkInterface nif) {
if (Platform.isOSX()) {
if (nif.getName().contains("awdl")) {
return false; // exclude awdl
if (nif.getName().contains("awdl") || nif.getName().contains("docker")) {
return false; // exclude awdl or docker
}
// filter out interfaces that only have link-local IPv6 addresses
// on macOS interfaces like 'en6' fall in this category and
Expand All @@ -146,7 +146,7 @@ public static boolean isTestable(NetworkInterface nif) {
}
}

if (Platform.isLinux() || Platform.isOSX()) {
if (Platform.isLinux()) {
String dName = nif.getDisplayName();
if (dName != null && dName.contains("docker")) {
return false;
Expand Down

0 comments on commit d5c3f69

Please sign in to comment.