distributed link fixes
Change-Id: Iefede001a76834599a5629d843a4325283e42711
diff --git a/core/net/src/main/java/org/onlab/onos/net/link/impl/LinkManager.java b/core/net/src/main/java/org/onlab/onos/net/link/impl/LinkManager.java
index 7b35f1c..835c47e 100644
--- a/core/net/src/main/java/org/onlab/onos/net/link/impl/LinkManager.java
+++ b/core/net/src/main/java/org/onlab/onos/net/link/impl/LinkManager.java
@@ -201,10 +201,10 @@
ConnectPoint dst = linkDescription.dst();
// if we aren't master for the device associated with the ConnectPoint
// we probably shouldn't be doing this.
- if ((deviceService.getRole(src.deviceId()) != MastershipRole.MASTER) ||
- (deviceService.getRole(dst.deviceId()) != MastershipRole.MASTER)) {
- return;
- }
+
+// if (deviceService.getRole(dst.deviceId()) != MastershipRole.MASTER) {
+// return;
+// }
LinkEvent event = store.createOrUpdateLink(provider().id(),
linkDescription);
if (event != null) {
@@ -220,14 +220,8 @@
ConnectPoint src = linkDescription.src();
ConnectPoint dst = linkDescription.dst();
- // if we aren't master for the device associated with the ConnectPoint
- // we probably shouldn't be doing this.
- if ((deviceService.getRole(src.deviceId()) != MastershipRole.MASTER) ||
- (deviceService.getRole(dst.deviceId()) != MastershipRole.MASTER)) {
- return;
- }
- LinkEvent event = store.removeLink(linkDescription.src(),
- linkDescription.dst());
+
+ LinkEvent event = store.removeLink(src, dst);
if (event != null) {
log.info("Link {} vanished", linkDescription);
post(event);