Uploaded image for project: 'vpp'
  1. vpp
  2. VPP-91

segment routing add/del tunnel lookup doesn't work

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Medium Medium
    • 16.09
    • None
    • None

      The logic to check if a tunnel exists before creating one is a bit strange. In particular adding a tunnel with

      sudo vppctl sr tunnel src fe80::a00:27ff:fef6:98fd dst 2620:124:9001::/64 next 2620:124:9000::2 InPE 1 clean
      

      will report that the tunnel already exists - even if this is the first such tunnel to grace VPP.

      The logic reads:

      a = <some other check which much be true>
      ...
      if (a->name)
          p = hash_get_mem(sm->tunnel_index_by_name, a->name);
      else if (p==0)
          p = hash_get_mem (sm->tunnel_index_by_key, &key);
      

      Which to me says "only add the tunnel if one of the same name does not already exist". The check against the key is never consulted because if no name is given the check against "p" wins, which is always set.

      As predicted, simply adding a name to the tunnel definition works, even though it's optional.

            chrisluke Chris Luke
            chrisluke Chris Luke
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: