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

Making MTU size for OSPF packets configurable instead of hardcoding of 1500

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open (View Workflow)
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 1.12.0
    • Fix Version/s: None
    • Component/s: None
    • Labels:
    • Environment:

      ONOS 1.12.0 release.

      OS: ubuntu14.x

      RAM: 16GB

      Description

      Making MTU size for OSPF packets configurable instead of hardcoding of 1500. This will help to change the size of the MTU using rest. Attachment contains the complete file with fix to make MTU as configurable value. Please analyze the fix.

      File Name: OspfConfigUtil.java
      public static final String MTU = "mtu";

      • Checks if valid mtu or not.
        *
      • @param strInput input value
      • @return true if valid else false
        */
        private static boolean isValidMtu(String strInput) {
        boolean isValid = true;
        if (isPrimitive(strInput)) {
        int input = Integer.parseInt(strInput);
        if (input < 1 || input > 1500) {
        log.debug("Wrong config input value: {}", strInput);
        isValid = false;
        } else { isValid = true; }

      } else

      { isValid = false; }

      return isValid;
      }

      In function interfaceDetails

      String mtu = interfaceNode.path(MTU).asText();
      if (isValidMtu(mtu)) {
      log.debug("MTU received is {} and setting the same.", mtu);
      ospfInterface.setMtu(Integer.parseInt(mtu));
      } else {
      log.debug("Wrong MTU received: {}. So setting default MTU as 1024", mtu);
      ospfInterface.setMtu(OspfUtil.MTU);
      }
      ospfInterface.setRouterPriority(OspfUtil.ROUTER_PRIORITY);

      This fix is provided by Aricent.

        Attachments

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

          Activity

            People

            Assignee:
            saketbhardwaj Saket Bhardwaj
            Reporter:
            saketbhardwaj Saket Bhardwaj
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated: