host provider detects hosts on ip as well
Change-Id: I76a1d51fb444a074c76a4b44818f02e7aa2944ef
diff --git a/apps/mobility/src/main/java/org/onlab/onos/mobility/HostMobility.java b/apps/mobility/src/main/java/org/onlab/onos/mobility/HostMobility.java
index cb60405..7958f99 100644
--- a/apps/mobility/src/main/java/org/onlab/onos/mobility/HostMobility.java
+++ b/apps/mobility/src/main/java/org/onlab/onos/mobility/HostMobility.java
@@ -28,7 +28,7 @@
/**
- * Sample reactive forwarding application.
+ * Sample mobility application. Cleans up flowmods when a host moves.
*/
@Component(immediate = true)
public class HostMobility {
@@ -82,6 +82,10 @@
}
+ /**
+ * For a given host, remove any flow rule which references it's addresses.
+ * @param host the host to clean up for
+ */
private void cleanup(Host host) {
Iterable<Device> devices = deviceService.getDevices();
List<FlowRule> flowRules = Lists.newLinkedList();
@@ -102,7 +106,6 @@
EthCriterion eth = (EthCriterion) c;
if (eth.mac().equals(mac)) {
flowRules.add(rule);
- break;
}
}
}