Fix a bug when processing Port UP/DOWN events from the OpenFlow driver,
because those were ignored.
This is a bug that was introduced by the OpenFlow-1.3 integration.
With this fix, we threat Port UP/DOWN same as Port ADD/DELETE which
was the behavior before the integration.
Bug found by: Andrew Lee
Change-Id: Ib94a387aefaf02a2b1917a8a98c79f91a8ae89ee
diff --git a/src/main/java/net/onrc/onos/core/topology/TopologyPublisher.java b/src/main/java/net/onrc/onos/core/topology/TopologyPublisher.java
index 8b77745..b1ea740 100644
--- a/src/main/java/net/onrc/onos/core/topology/TopologyPublisher.java
+++ b/src/main/java/net/onrc/onos/core/topology/TopologyPublisher.java
@@ -300,8 +300,14 @@
case DELETE:
switchPortRemoved(swId, port);
break;
- case DOWN:
case UP:
+ // NOTE: Currently, we treat Port UP/DOWN same as Port ADD/DELETE
+ switchPortAdded(swId, port);
+ break;
+ case DOWN:
+ // NOTE: Currently, we treat Port UP/DOWN same as Port ADD/DELETE
+ switchPortRemoved(swId, port);
+ break;
case OTHER_UPDATE:
default:
// XXX S what is the right set of port change handlers?