Permalink
Browse files

If the incoming node port is blocked, allow only unicast and BDDP pac…

…kets to continue down the processing chain.
  • Loading branch information...
1 parent 2ca047b commit a551290bf57dd14abc7f0d98b60c4c39534519ce @sriniram sriniram committed Apr 1, 2012
View
18 src/main/java/net/floodlightcontroller/devicemanager/internal/DeviceManagerImpl.java
@@ -821,14 +821,18 @@ public Command processPacketInMessage(IOFSwitch sw, OFPacketIn pi,
// in this situation.
short pinPort = pi.getInPort();
long pinSw = sw.getId();
- if (eth.getEtherType() != Ethernet.TYPE_BDDP &&
- topology.isAllowed(pinSw, pinPort) == false) {
- if (log.isDebugEnabled()) {
- log.debug("deviceManager: Stopping packet as it is coming" +
- "in on a port blocked by higher layer on." +
- "switch ={}, port={}", new Object[] {sw.getStringId(), pinPort});
+ if (topology.isAllowed(pinSw, pinPort) == false) {
+ if (eth.getEtherType() != Ethernet.TYPE_BDDP ||
+ eth.isMulticast() == false) {
+ return Command.CONTINUE;
+ } else {
+ if (log.isDebugEnabled()) {
+ log.debug("deviceManager: Stopping packet as it is coming" +
+ "in on a port blocked by higher layer on." +
+ "switch ={}, port={}", new Object[] {sw.getStringId(), pinPort});
+ }
+ return Command.STOP;
}
- return Command.STOP;
}
Command ret = Command.CONTINUE;

0 comments on commit a551290

Please sign in to comment.