Yuta HIGUCHI

check applicability before accepting remote port update

Change-Id: I047881fcc412819558f8d32c30476512e47ae902
...@@ -1266,6 +1266,12 @@ public class GossipDeviceStore ...@@ -1266,6 +1266,12 @@ public class GossipDeviceStore
1266 DeviceId deviceId = event.deviceId(); 1266 DeviceId deviceId = event.deviceId();
1267 Timestamped<List<PortDescription>> portDescriptions = event.portDescriptions(); 1267 Timestamped<List<PortDescription>> portDescriptions = event.portDescriptions();
1268 1268
1269 + if (getDevice(deviceId) == null) {
1270 + log.info("{} not found on this node yet, ignoring.", deviceId);
1271 + // Note: dropped information will be recovered by anti-entropy
1272 + return;
1273 + }
1274 +
1269 notifyDelegate(updatePortsInternal(providerId, deviceId, portDescriptions)); 1275 notifyDelegate(updatePortsInternal(providerId, deviceId, portDescriptions));
1270 } 1276 }
1271 } 1277 }
...@@ -1282,6 +1288,12 @@ public class GossipDeviceStore ...@@ -1282,6 +1288,12 @@ public class GossipDeviceStore
1282 DeviceId deviceId = event.deviceId(); 1288 DeviceId deviceId = event.deviceId();
1283 Timestamped<PortDescription> portDescription = event.portDescription(); 1289 Timestamped<PortDescription> portDescription = event.portDescription();
1284 1290
1291 + if (getDevice(deviceId) == null) {
1292 + log.info("{} not found on this node yet, ignoring.", deviceId);
1293 + // Note: dropped information will be recovered by anti-entropy
1294 + return;
1295 + }
1296 +
1285 notifyDelegateIfNotNull(updatePortStatusInternal(providerId, deviceId, portDescription)); 1297 notifyDelegateIfNotNull(updatePortStatusInternal(providerId, deviceId, portDescription));
1286 } 1298 }
1287 } 1299 }
......