Uploaded image for project: 'OpenFlowPlugin'
  1. OpenFlowPlugin
  2. OPNFLWPLUG-413

Incorrect logic in matchbuilder

    XMLWordPrintable

Details

    • Bug
    • Status: Resolved
    • Resolution: Done
    • None
    • None
    • General
    • None
    • Operating System: All
      Platform: All

    • 3053

    Description

      This was masked by 3050 and thus not visible.

      If you have a match with entriesBuilder.setHasMask(false);

      (as in some testcases), the following logic in MatchCovertorImpl results in an invalid prefix (ip address instead of prefix)

      if (maskMatchEntry != null) {
      ipv6PrefixStr += PREFIX_SEPARATOR
      + MatchConvertorUtil.ipv6NetmaskArrayToCIDRValue(maskMatchEntry.getMask());
      }

      It should be:

      if (maskMatchEntry != null) {
      ipv6PrefixStr += PREFIX_SEPARATOR
      + MatchConvertorUtil.ipv6NetmaskArrayToCIDRValue(maskMatchEntry.getMask());
      } else {
      pv6PrefixStr += PREFIX_SEPARATOR + "128";
      }

      Similar for IPv4 prefixes.

      I am quoting sources and lines from Helium. I have not looked at master which I suspect is likely to have the same bug.

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            Unassigned Unassigned
            aivanov@brocade.com Anton Ivanov
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: