Bug 380 SwitchManager.getHardwareMAC() does not handle empty string case
[controller.git] / opendaylight / switchmanager / implementation / src / main / java / org / opendaylight / controller / switchmanager / internal / SwitchManager.java
index 770180c04e7ae754e91d12659ae43ea2577a3d4b..ca6987ad6cf23cb3fa142b8d6747da0cc3fa0a8e 100644 (file)
@@ -1397,7 +1397,7 @@ public class SwitchManager implements ISwitchManager, IConfigurationContainerAwa
             } catch (SocketException e) {
                 log.error("Failed to acquire controller MAC: ", e);
             }
-            if (macAddress != null) {
+            if (macAddress != null && macAddress.length != 0) {
                 break;
             }
         }