Skip to content
Snippets Groups Projects
Commit 4d84b6e7 authored by Ryan Izard's avatar Ryan Izard Committed by GitHub
Browse files

Merge pull request #694 from rizard/master

Check special ports using loxi, not using bitmasks
parents 969e1900 8ad4a831
No related branches found
No related tags found
No related merge requests found
...@@ -297,8 +297,20 @@ ITopologyManagerBackend, ILinkDiscoveryListener, IOFMessageListener { ...@@ -297,8 +297,20 @@ ITopologyManagerBackend, ILinkDiscoveryListener, IOFMessageListener {
return false; return false;
// Check whether the port is a physical port. We should not learn // Check whether the port is a physical port. We should not learn
// attachment points on "special" ports. // attachment points on "special" ports. Exclude LOCAL, where devices
if ((port.getShortPortNumber() & 0xff00) == 0xff00 && port.getShortPortNumber() != (short)0xfffe) return false; // might live if they are on the switch OS itself
if (port.equals(OFPort.ALL) ||
port.equals(OFPort.CONTROLLER) ||
port.equals(OFPort.ANY) ||
port.equals(OFPort.FLOOD) ||
port.equals(OFPort.ZERO) ||
port.equals(OFPort.NO_MASK) ||
port.equals(OFPort.IN_PORT) ||
port.equals(OFPort.NORMAL) ||
port.equals(OFPort.TABLE)
) {
return false;
}
// Make sure that the port is enabled. // Make sure that the port is enabled.
IOFSwitch sw = switchService.getActiveSwitch(switchid); IOFSwitch sw = switchService.getActiveSwitch(switchid);
......
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