check applicability before accepting remote port update
Change-Id: I047881fcc412819558f8d32c30476512e47ae902
diff --git a/core/store/dist/src/main/java/org/onlab/onos/store/device/impl/GossipDeviceStore.java b/core/store/dist/src/main/java/org/onlab/onos/store/device/impl/GossipDeviceStore.java
index 5449277..1d0343d 100644
--- a/core/store/dist/src/main/java/org/onlab/onos/store/device/impl/GossipDeviceStore.java
+++ b/core/store/dist/src/main/java/org/onlab/onos/store/device/impl/GossipDeviceStore.java
@@ -1266,6 +1266,12 @@
DeviceId deviceId = event.deviceId();
Timestamped<List<PortDescription>> portDescriptions = event.portDescriptions();
+ if (getDevice(deviceId) == null) {
+ log.info("{} not found on this node yet, ignoring.", deviceId);
+ // Note: dropped information will be recovered by anti-entropy
+ return;
+ }
+
notifyDelegate(updatePortsInternal(providerId, deviceId, portDescriptions));
}
}
@@ -1282,6 +1288,12 @@
DeviceId deviceId = event.deviceId();
Timestamped<PortDescription> portDescription = event.portDescription();
+ if (getDevice(deviceId) == null) {
+ log.info("{} not found on this node yet, ignoring.", deviceId);
+ // Note: dropped information will be recovered by anti-entropy
+ return;
+ }
+
notifyDelegateIfNotNull(updatePortStatusInternal(providerId, deviceId, portDescription));
}
}