Skip to content
Snippets Groups Projects
Commit caa9f249 authored by abat's avatar abat
Browse files

Merge into master from pull request #292:

Bug fix in attachment point comparison. (https://github.com/floodlight/floodlight/pull/292)
parents 6bb3a27e ca22fee0
No related branches found
No related tags found
No related merge requests found
...@@ -255,7 +255,7 @@ public class Device implements IDevice { ...@@ -255,7 +255,7 @@ public class Device implements IDevice {
} }
int x = deviceManager.apComparator.compare(oldAP, newAP); int x = deviceManager.apComparator.compare(oldAP, newAP);
if (x > 0) { if (x < 0) {
// newAP replaces oldAP. // newAP replaces oldAP.
apMap.put(id, newAP); apMap.put(id, newAP);
this.attachmentPoints = this.attachmentPoints =
......
...@@ -278,7 +278,7 @@ IFlowReconcileListener, IInfoProvider, IHAListener { ...@@ -278,7 +278,7 @@ IFlowReconcileListener, IInfoProvider, IHAListener {
// and the newAP is not a broadcast domain. // and the newAP is not a broadcast domain.
if (!topology.isConsistent(oldSw, oldPort, newSw, newPort) && if (!topology.isConsistent(oldSw, oldPort, newSw, newPort) &&
!topology.isBroadcastDomainPort(newSw, newPort)) !topology.isBroadcastDomainPort(newSw, newPort))
return 1; return -1;
// If newAP is inconsistent with the oldAP and // If newAP is inconsistent with the oldAP and
// oldAP belongs to broadcast domain and // oldAP belongs to broadcast domain and
...@@ -289,7 +289,7 @@ IFlowReconcileListener, IInfoProvider, IHAListener { ...@@ -289,7 +289,7 @@ IFlowReconcileListener, IInfoProvider, IHAListener {
topology.isBroadcastDomainPort(newSw, newPort) && topology.isBroadcastDomainPort(newSw, newPort) &&
newAP.getLastSeen() > oldAP.getLastSeen() + newAP.getLastSeen() > oldAP.getLastSeen() +
AttachmentPoint.EXTERNAL_TO_EXTERNAL_TIMEOUT) AttachmentPoint.EXTERNAL_TO_EXTERNAL_TIMEOUT)
return 1; return -1;
// If newAP is inconsistent with the oldAP and // If newAP is inconsistent with the oldAP and
// oldAP does not to broadcast domain and // oldAP does not to broadcast domain and
...@@ -300,7 +300,7 @@ IFlowReconcileListener, IInfoProvider, IHAListener { ...@@ -300,7 +300,7 @@ IFlowReconcileListener, IInfoProvider, IHAListener {
topology.isBroadcastDomainPort(newSw, newPort) && topology.isBroadcastDomainPort(newSw, newPort) &&
newAP.getLastSeen() > oldAP.getLastSeen() + newAP.getLastSeen() > oldAP.getLastSeen() +
AttachmentPoint.OPENFLOW_TO_EXTERNAL_TIMEOUT) AttachmentPoint.OPENFLOW_TO_EXTERNAL_TIMEOUT)
return 1; return -1;
// If newAP is inconsistent with the oldAP and // If newAP is inconsistent with the oldAP and
// oldAP does not to broadcast domain and // oldAP does not to broadcast domain and
...@@ -309,9 +309,9 @@ IFlowReconcileListener, IInfoProvider, IHAListener { ...@@ -309,9 +309,9 @@ IFlowReconcileListener, IInfoProvider, IHAListener {
if (topology.isConsistent(oldSw, oldPort, newSw, newPort) && if (topology.isConsistent(oldSw, oldPort, newSw, newPort) &&
newAP.getLastSeen() > oldAP.getLastSeen() + newAP.getLastSeen() > oldAP.getLastSeen() +
AttachmentPoint.CONSISTENT_TIMEOUT) AttachmentPoint.CONSISTENT_TIMEOUT)
return 1; return -1;
return -1; return 1;
} }
} }
/** /**
......
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