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

Receiving a packet on a GRE interface before it's set "up" fails assert

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: High High
    • 16.06
    • None
    • None

      /vpp/build-data/../vnet/vnet/gre/node.c:360 (gre_input) assertion `(tunnel_sw_if_index) < vec_len (ip4m->fib_index_by_sw_if_index)' fails
      

      Setup:

      sudo $vppctl set int ip address tap-0 192.168.1.1/24
      sudo $vppctl set int state tap-0 up
      
      sudo $vppctl loopback create mac CA:D3:0D:E6:F0:8C
      sudo $vppctl set interface state loop0 up
      
      sudo $vppctl create gre tunnel src 192.168.1.1 dst 192.168.1.2 outer-fib-id 0
      sudo $vppctl set interface l2 bridge gre0 13 1
      
      sudo $vppctl set interface l2 bridge loop0 13 bvi
      sudo $vppctl set interface ip address loop0 10.1.0.1/24
      

      In the crashing case, 'gre0' was the most recent interface created. My initial analysis is that the fib_index_by_sw_index vec is not extended to include the most recent interface until it is set "up", wit:

      (gdb) pvec ip4_main->fib_index_by_sw_if_index
      $1 = {0, 0, 0, 0, 0, 0, 0}
      (gdb) c
      Continuing.
      DBGvpp# set interface state gre0 up
      DBGvpp#
      ...
      (gdb) pvec ip4_main->fib_index_by_sw_if_index
      $2 = {0, 0, 0, 0, 0, 0, 0, 0}
      

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

              Created:
              Updated:
              Resolved: