From d0eb6e4c6098f7f3a1366fcfd5df22c26c15c24c Mon Sep 17 00:00:00 2001 From: Elek Jani Date: Wed, 22 Jan 2014 11:29:04 +0100 Subject: [PATCH] Include the incomming port in PacketOut message. Without this flood messages do not omit the incomming port on the switch. Change-Id: I932d00c1f17b95678cb73136aefa05fcc5718a95 Signed-off-by: Elek Jani --- .../openflow/internal/DataPacketMuxDemux.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/opendaylight/protocol_plugins/openflow/src/main/java/org/opendaylight/controller/protocol_plugin/openflow/internal/DataPacketMuxDemux.java b/opendaylight/protocol_plugins/openflow/src/main/java/org/opendaylight/controller/protocol_plugin/openflow/internal/DataPacketMuxDemux.java index a1fcd1ab23..5c2af6d8b4 100644 --- a/opendaylight/protocol_plugins/openflow/src/main/java/org/opendaylight/controller/protocol_plugin/openflow/internal/DataPacketMuxDemux.java +++ b/opendaylight/protocol_plugins/openflow/src/main/java/org/opendaylight/controller/protocol_plugin/openflow/internal/DataPacketMuxDemux.java @@ -313,9 +313,13 @@ public class DataPacketMuxDemux implements IContainerListener, // build packet out OFPacketOut po = new OFPacketOut() .setBufferId(OFPacketOut.BUFFER_ID_NONE) - .setInPort(OFPort.OFPP_NONE) .setActions(Collections.singletonList((OFAction) action)) .setActionsLength((short) OFActionOutput.MINIMUM_LENGTH); + if(outPkt.getIncomingNodeConnector() != null) { + po.setInPort((Short)outPkt.getIncomingNodeConnector().getID()); + } else { + po.setInPort(OFPort.OFPP_NONE); + } po.setLengthU(OFPacketOut.MINIMUM_LENGTH + po.getActionsLength() + data.length); -- 2.36.6