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

Bug fix: When tunnel links are identified, they should not be added to...

Bug fix: When tunnel links are identified, they should not be added to topology switchportlinks.  Update unit tests.
parent d808dbff
No related branches found
No related tags found
No related merge requests found
...@@ -1223,16 +1223,20 @@ public class TopologyManager implements ...@@ -1223,16 +1223,20 @@ public class TopologyManager implements
public void addOrUpdateLink(long srcId, short srcPort, long dstId, public void addOrUpdateLink(long srcId, short srcPort, long dstId,
short dstPort, LinkType type) { short dstPort, LinkType type) {
Link link = new Link(srcId, srcPort, dstId, dstPort); Link link = new Link(srcId, srcPort, dstId, dstPort);
addPortToSwitch(srcId, srcPort);
addPortToSwitch(dstId, dstPort);
addLinkToStructure(switchPortLinks, link);
if (type.equals(LinkType.MULTIHOP_LINK)) { if (type.equals(LinkType.MULTIHOP_LINK)) {
addPortToSwitch(srcId, srcPort);
addPortToSwitch(dstId, dstPort);
addLinkToStructure(switchPortLinks, link);
addLinkToStructure(portBroadcastDomainLinks, link); addLinkToStructure(portBroadcastDomainLinks, link);
dtLinksUpdated = removeLinkFromStructure(directLinks, link); dtLinksUpdated = removeLinkFromStructure(directLinks, link);
linksUpdated = true; linksUpdated = true;
} else if (type.equals(LinkType.DIRECT_LINK)) { } else if (type.equals(LinkType.DIRECT_LINK)) {
addPortToSwitch(srcId, srcPort);
addPortToSwitch(dstId, dstPort);
addLinkToStructure(switchPortLinks, link);
addLinkToStructure(directLinks, link); addLinkToStructure(directLinks, link);
removeLinkFromStructure(portBroadcastDomainLinks, link); removeLinkFromStructure(portBroadcastDomainLinks, link);
dtLinksUpdated = true; dtLinksUpdated = true;
......
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