From 29a220718daaf6ef03f205bfe6c9d918a787a436 Mon Sep 17 00:00:00 2001 From: Alex Fan Date: Thu, 3 Jul 2014 18:03:28 -0700 Subject: [PATCH] Fix a bug in flooding in sendPacketOut. Change-Id: Id9d71a3079151850f5d6acc5bb8cd67ad347b9b2 Signed-off-by: Alex Fan --- .../opendaylight/l2switch/packet/PacketDispatcher.java | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/l2switch-main/src/main/java/org/opendaylight/l2switch/packet/PacketDispatcher.java b/l2switch-main/src/main/java/org/opendaylight/l2switch/packet/PacketDispatcher.java index 72c13545..3322ee7f 100644 --- a/l2switch-main/src/main/java/org/opendaylight/l2switch/packet/PacketDispatcher.java +++ b/l2switch-main/src/main/java/org/opendaylight/l2switch/packet/PacketDispatcher.java @@ -64,15 +64,11 @@ public class PacketDispatcher { NodeConnectorRef pktIngress = inventoryReader.getControllerSwitchConnectors().get(nodeId); List 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); - } } /** -- 2.36.6