Uploaded image for project: 'hc2vpp'
  1. hc2vpp
  2. HC2VPP-363

Fix FIB table references in vxlan-gpe implementation

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Medium Medium
    • None
    • 18.07
    • v3po
    • None

      VXLAN-GPE definition uses VRF/FIB references:

        grouping vxlan-gpe-base-attributes {
          leaf local {
            /*mandatory true;*/
            type inet:ip-address;
          }
          leaf remote {
            /*mandatory true;*/
            type inet:ip-address;
          }
          leaf vni {
            /*mandatory true;*/
            type vxlan-gpe-vni;
          }
          leaf next-protocol {
            type vxlan-gpe-next-protocol;
          }
          leaf encap-vrf-id {
            type uint32;
          }
          leaf decap-vrf-id {
            type uint32;
          }
        }
      

      While the encap-vrf-id seems to be mandatory (-1 is not allowed, VPP failes if FIB table for the given index does not exists), decap-vrf-id can take any value:

      /* Interpret decap_vrf_id as an opaque if sending to other-than-ip4-input */
        if (protocol == VXLAN_GPE_INPUT_NEXT_IP4_INPUT)
          {
            p = hash_get (im->fib_index_by_table_id, ntohl (mp->decap_vrf_id));
            if (!p)
      	{
      	  rv = VNET_API_ERROR_NO_SUCH_INNER_FIB;
      	  goto out;
      	}
            decap_fib_index = p[0];
          }
        else
          {
            decap_fib_index = ntohl (mp->decap_vrf_id);
          }
      

      This behavior is not documented in the API file.
      Investigate correct type for both VRF references.

            Unassigned Unassigned
            mgradzki Marek Gradzki
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: