On link flap new SimpleForwarding flows are rejected by FRM 87/3487/1
authorAlessandro Boch <aboch@cisco.com>
Thu, 5 Dec 2013 07:54:19 +0000 (23:54 -0800)
committerAlessandro Boch <aboch@cisco.com>
Thu, 5 Dec 2013 07:55:37 +0000 (23:55 -0800)
Change-Id: I7a246bdd2222dc6d7b5ca3aa16e4bd1284c96530
Signed-off-by: Alessandro Boch <aboch@cisco.com>
opendaylight/samples/simpleforwarding/src/main/java/org/opendaylight/controller/samples/simpleforwarding/internal/SimpleForwardingImpl.java

index 043fdc0..a34cbb5 100644 (file)
@@ -634,7 +634,7 @@ public class SimpleForwardingImpl implements IfNewHostNotify,
                 po = e.getValue();
                 if (po != null) {
                     // Populate the Policy field now
                 po = e.getValue();
                 if (po != null) {
                     // Populate the Policy field now
-                    Status poStatus = this.frm.installFlowEntry(po);
+                    Status poStatus = this.frm.modifyOrAddFlowEntry(po);
                     if (!poStatus.isSuccess()) {
                         log.error("Failed to install policy: "
                                 + po.getGroupName() + " ("
                     if (!poStatus.isSuccess()) {
                         log.error("Failed to install policy: "
                                 + po.getGroupName() + " ("
@@ -842,8 +842,9 @@ public class SimpleForwardingImpl implements IfNewHostNotify,
     @Override
     public void notifyNode(Node node, UpdateType type,
             Map<String, Property> propMap) {
     @Override
     public void notifyNode(Node node, UpdateType type,
             Map<String, Property> propMap) {
-        if (node == null)
+        if (node == null) {
             return;
             return;
+        }
 
         switch (type) {
         case REMOVED:
 
         switch (type) {
         case REMOVED:
@@ -858,8 +859,9 @@ public class SimpleForwardingImpl implements IfNewHostNotify,
     @Override
     public void notifyNodeConnector(NodeConnector nodeConnector,
             UpdateType type, Map<String, Property> propMap) {
     @Override
     public void notifyNodeConnector(NodeConnector nodeConnector,
             UpdateType type, Map<String, Property> propMap) {
-        if (nodeConnector == null)
+        if (nodeConnector == null) {
             return;
             return;
+        }
 
         boolean up = false;
         switch (type) {
 
         boolean up = false;
         switch (type) {