Skip to content
Snippets Groups Projects
Commit 7a783cdc authored by Srinivasan Ramasubramanian's avatar Srinivasan Ramasubramanian
Browse files

Do not push packet out if outport matches inport.

parent 06da6c49
No related branches found
No related tags found
No related merge requests found
......@@ -352,11 +352,15 @@ public abstract class ForwardingBase
*/
protected void pushPacket(IOFSwitch sw, OFMatch match, OFPacketIn pi,
short outport, FloodlightContext cntx) {
if (pi == null) {
return;
} else if (pi.getInPort() == outport){
log.warn("Packet out not sent as the outport matches inport. {}",
pi);
return;
}
// The assumption here is (sw) is the switch that generated the
// packet-in. If the input port is the same as output port, then
// the packet-out should be ignored.
......@@ -369,7 +373,7 @@ public abstract class ForwardingBase
return;
}
}
if (log.isTraceEnabled()) {
log.trace("PacketOut srcSwitch={} match={} pi={}",
new Object[] {sw, match, pi});
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment