diff --git a/src/main/java/org/elasticsearch/common/network/NetworkUtils.java b/src/main/java/org/elasticsearch/common/network/NetworkUtils.java index b52d5d95a1e..d94ce50172e 100644 --- a/src/main/java/org/elasticsearch/common/network/NetworkUtils.java +++ b/src/main/java/org/elasticsearch/common/network/NetworkUtils.java @@ -239,7 +239,7 @@ public abstract class NetworkUtils { List allInterfaces = new ArrayList(); for (Enumeration interfaces = NetworkInterface.getNetworkInterfaces(); interfaces.hasMoreElements(); ) { NetworkInterface intf = interfaces.nextElement(); - allInterfaces.add(interfaces.nextElement()); + allInterfaces.add(intf); Enumeration subInterfaces = intf.getSubInterfaces(); if (subInterfaces != null && subInterfaces.hasMoreElements()) {