Skip to content
Snippets Groups Projects
Commit f55af80a authored by Puneet Singh's avatar Puneet Singh
Browse files

Update ACL.java

In the event the device manger does not yet know an attachment point for a device, the ACL should detect that and perform a noop. Simply checking the length of the SwitchPort[] returned from the device manger should fix the problem. If the length is zero, return; else, proceed.
parent 22c771e5
No related branches found
No related tags found
No related merge requests found
......@@ -351,7 +351,11 @@ public class ACL implements IACLService, IFloodlightModule, IDeviceListener {
@Override
public void deviceAdded(IDevice device) {
SwitchPort[] switchPort = device.getAttachmentPoints();
SwitchPort[] switchPort = device.getAttachmentPoints();
if (switchPort.length == 0) {
//Device manager does not yet know an attachment point for a device (Bug Fix)
return;
}
IPv4Address[] ips = device.getIPv4Addresses();
if (ips.length == 0) {
// A new no-ip device added
......
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