Fix a bug in flooding in sendPacketOut. 52/8652/1
authorAlex Fan <railor33@gmail.com>
Fri, 4 Jul 2014 01:03:28 +0000 (18:03 -0700)
committerAlex Fan <railor33@gmail.com>
Fri, 4 Jul 2014 01:03:28 +0000 (18:03 -0700)
Change-Id: Id9d71a3079151850f5d6acc5bb8cd67ad347b9b2
Signed-off-by: Alex Fan <railor33@gmail.com>
l2switch-main/src/main/java/org/opendaylight/l2switch/packet/PacketDispatcher.java

index 72c13545516fef9429b8be3b15b2798e5027d2c9..3322ee7f0e5f2eba44f2b168b38d5cdb535b0fdd 100644 (file)
@@ -64,15 +64,11 @@ public class PacketDispatcher  {
     NodeConnectorRef pktIngress = inventoryReader.getControllerSwitchConnectors().get(nodeId);
     List<NodeConnectorRef> nodeConnectors = inventoryReader.getSwitchNodeConnectors().get(nodeId);
     for (NodeConnectorRef ncRef : nodeConnectors) {
-      if (ncRef.getValue().firstIdentifierOf(NodeConnector.class).firstKeyOf(NodeConnector.class, NodeConnectorKey.class).getId().getValue().equals(
+      if (!ncRef.getValue().firstIdentifierOf(NodeConnector.class).firstKeyOf(NodeConnector.class, NodeConnectorKey.class).getId().getValue().equals(
         ingress.getValue().firstIdentifierOf(NodeConnector.class).firstKeyOf(NodeConnector.class, NodeConnectorKey.class).getId().getValue())) {
-        nodeConnectors.remove(ncRef);
-        break;
+        sendPacketOut(payload, pktIngress, ncRef);
       }
     }
-    for (NodeConnectorRef ncRef : nodeConnectors) {
-      sendPacketOut(payload, pktIngress, ncRef);
-    }
   }
 
   /**