Charles Chan
Committed by Gerrit Code Review

Fix NPE in NetworkConfigHostProvider

Change-Id: I89ca7328abdbb06d75ea3840d6606835584eaddc
......@@ -110,7 +110,9 @@ public class NetworkConfigHostProvider extends AbstractProvider implements HostP
*/
protected void addHost(MacAddress mac, VlanId vlan, HostLocation hloc, Set<IpAddress> ips) {
HostId hid = HostId.hostId(mac, vlan);
HostDescription desc = new DefaultHostDescription(mac, vlan, hloc, ips);
HostDescription desc = (ips != null) ?
new DefaultHostDescription(mac, vlan, hloc, ips) :
new DefaultHostDescription(mac, vlan, hloc);
providerService.hostDetected(hid, desc, false);
}
......