-
Type:
Story
-
Status: Closed (View Workflow)
-
Priority:
Major
-
Resolution: Done
-
Affects Version/s: 1.7.0
-
Fix Version/s: 1.7.0
-
Component/s: None
-
Story Points:1
-
Sprint:Hummingbird sprint 3
In protocols/bgp/bgpio/src/main/java/org/onosproject/bgpio/protocol/linkstate/BgpLinkLSIdentifier.java,
'parseLinkDescriptors' can parse multiple number of 'MultiTopologyId TLV' in a link descriptor, because 'count' has ambiguous operation and assignment (' count = count++; ')
-----------------------------------------------------------------------------------------------------------------------------------------------------------------
public static LinkedList<BgpValueType> parseLinkDescriptors(ChannelBuffer cb) throws BgpParseException {
...
int count = 0;
while (cb.readableBytes() > 0) {
...
case BgpAttrNodeMultiTopologyId.ATTRNODE_MULTITOPOLOGY:
...
count = count++; // ambiguous operation and assignment
//MultiTopologyId TLV cannot repeat more than once
if (count > 1)
...
}
...
}
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------
As a result of above operation, count will be always '0' and it can parse and add multiple number of 'MultiTopologyId TLV' in a link descriptor.