< prev index next >
test/java/net/ipv6tests/Tests.java
Print this page
@@ -25,11 +25,14 @@
import java.io.*;
import java.util.*;
public class Tests {
- static boolean isWindows = System.getProperty("os.name").startsWith("Windows");
+ static final boolean isWindows =
+ System.getProperty("os.name").startsWith("Windows");
+ static final boolean isMacOS =
+ System.getProperty("os.name", "unknown").contains("OS X");
/**
* performs a simple exchange of data between the two sockets
* and throws an exception if there is any problem.
*/
@@ -276,10 +279,12 @@
// Skip (Windows)Teredo Tunneling Pseudo-Interface
if (isWindows) {
String dName = nic.getDisplayName();
if (dName != null && dName.contains("Teredo"))
continue;
+ } else if (isMacOS && nic.getName().contains("awdl")) {
+ continue;
}
try {
if (nic.isUp() && !nic.isLoopback())
return nic;
} catch (SocketException e) {
< prev index next >