openconfig/public

BFD bfd-diagnostic-code TYPO

gizzygizmo opened this issue · 3 comments

Fix for the skipped "Neighbor Signaled Session Down" enum in
bfd-diagnostic-code. #4 was skipped so i've renumbered the
remaining and added a new one (9) which was assigned by IANA
out of the reserved range

Value   BFD Diagnostic Code Name        Reference
0       No Diagnostic   [RFC5880]
1       Control Detection Time Expired  [RFC5880]
2       Echo Function Failed    [RFC5880]
3       Neighbor Signaled Session Down  [RFC5880]
4       Forwarding Plane Reset  [RFC5880]
5       Path Down       [RFC5880]
6       Concatenated Path Down  [RFC5880]
7       Administratively Down   [RFC5880]
8       Reverse Concatenated Path Down  [RFC5880]
9       mis-connectivity defect [RFC6428]
10-31   Unassigned

Reference:
https://datatracker.ietf.org/doc/html/rfc5880
https://www.iana.org/assignments/bfd-parameters/bfd-parameters.xhtml#bfd-parameters-1
https://www.rfc-editor.org/rfc/rfc6428.html

Proposed openconfig-bfd.yang update (openconfig-bfd.yang.txt):

  typedef bfd-diagnostic-code {
    type enumeration {
      enum NO_DIAGNOSTIC {
        value 0;
        description
          "No diagnostic code was specified, or the session has not
          changed state.";
      }
      enum DETECTION_TIMEOUT {
        value 1;
        description
          "The control detection time expired: no BFD packet was
          received within the required period.";
      }
      enum ECHO_FAILED {
        value 2;
        description
          "The BFD echo function failed - echo packets have not been
          received for the required period of time.";
      }
      enum NEIGHBOR_SIGNALED_DOWN {
        value 3;
        description
          "The neighbor has signaled session down (received state 
          is AdminDown";
      }
      enum FORWARDING_RESET {
        value 4;
        description
          "The forwarding plane in the local system was reset - such
          that the remote system cannot rely on the forwarding state of
          the device specifying this error code.";
      }
      enum PATH_DOWN {
        value 5;
        description
          "Signalling outside of BFD specified that the path underlying
          this session has failed.";
      }
      enum CONCATENATED_PATH_DOWN {
        value 6;
        description
          "When a BFD session runs over a series of path segments, this
          error code indicates that a subsequent path segment (i.e.,
          one in the transmit path between the source and destination
          of the session) has failed.";
      }
      enum ADMIN_DOWN {
        value 7;
        description
          "The BFD session has been administratively disabled by the
          peer.";
      }
      enum REVERSE_CONCATENATED_PATH_DOWN {
        value 8;
        description
          "In the case that a BFD session is running over a series of
          path segments, this error code indicates that a path segment
          on the reverse path (i.e., in the transmit direction from the
          destination to the source of the session) has failed.";
      }
      enum MIS_CONNECTIVITY_DEFECT {
        value 9;
        description
          "Further defect criteria beyond forwarding reset (4).  BFD
          control packets are received with an unexpected encapsulation.
          Receipt of an unexpected globally unique source MPE ID.
          Receipt of a session discriminator that is not in the local 
          BFD database or does not have the expected label. Receipt of 
          a message with incorrect auth information when auth is 
          enabled.  (RFC6428)";
      }
    }
    description
      "Diagnostic codes defined by BFD. These typically indicate the
      reason for a change of session state.";
    reference
      "RFC5880 - Bidirectional Forwarding Detection, Section
      4.1";
  }

I can open a PR if you allow access.. shld be easy fix.

dplore commented

Looks straightforward to me. Please do open a PR, I will review. You can note that this is a breaking change to a v0 model.