String prop = entry.getKey();
if (!updateProperties.containsKey(prop)) {
if (prop.equals(Description.propertyName)) {
- if (!advertisedDesc.isEmpty()) {
- Property desc = new Description(advertisedDesc);
- propMap.put(Description.propertyName, desc);
+ if (advertisedDesc != null) {
+ if (!advertisedDesc.isEmpty()) {
+ Property desc = new Description(advertisedDesc);
+ propMap.put(Description.propertyName, desc);
+ }
+ }
+ else {
+ propMap.remove(prop);
}
continue;
} else if (prop.equals(ForwardingMode.name)) {
} catch (SocketException e) {
log.error("Failed to acquire controller MAC: ", e);
}
- if (macAddress != null) {
+ if (macAddress != null && macAddress.length != 0) {
break;
}
}