Uploaded image for project: 'ONOS'
  1. ONOS
  2. ONOS-5261

BGP link descriptor cannot have multiple 'MultiTopologyId TLV'

    XMLWordPrintable

    Details

    • Story Points:
      1
    • Sprint:
      Hummingbird sprint 3

      Description

      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)

      { // exception }

      ...
      }
      ...
      }
      -------------------------------------------------------------------------------------------------------------------------------------------------------------------------

      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.

        Attachments

        # Subject Branch Project Status CR V

          Activity

            People

            Assignee:
            jaegonkim Jaegon Kim
            Reporter:
            jaegonkim Jaegon Kim
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: