gpe: initialize fib index for native forward entries 03/8403/2
authorFlorin Coras <fcoras@cisco.com>
Wed, 13 Sep 2017 00:24:00 +0000 (20:24 -0400)
committerDamjan Marion <dmarion.lists@gmail.com>
Wed, 13 Sep 2017 17:39:19 +0000 (17:39 +0000)
Change-Id: I972e6e645c3ae9cba4bb2b4e32c0272dfd67e87b
Signed-off-by: Florin Coras <fcoras@cisco.com>
src/vnet/lisp-gpe/lisp_gpe_fwd_entry.c

index 0a8dc03..dbbea41 100644 (file)
@@ -354,11 +354,12 @@ create_fib_entries (lisp_gpe_fwd_entry_t * lfe)
          if (vec_len (lgm->native_fwd_rpath[ip_version]))
            {
              ip_prefix_to_fib_prefix (&lfe->key->rmt.ippref, &fib_prefix);
-             fib_table_entry_update (lfe->eid_fib_index, &fib_prefix,
-                                     FIB_SOURCE_LISP, FIB_ENTRY_FLAG_NONE,
-                                     lgm->native_fwd_rpath[ip_version]);
+             fi = fib_table_entry_update (lfe->eid_fib_index, &fib_prefix,
+                                          FIB_SOURCE_LISP,
+                                          FIB_ENTRY_FLAG_NONE,
+                                          lgm->native_fwd_rpath[ip_version]);
              gpe_native_fwd_add_del_lfe (lfe, 1);
-             break;
+             goto done;
            }
        case LISP_NO_ACTION:
          /* TODO update timers? */
@@ -378,6 +379,7 @@ create_fib_entries (lisp_gpe_fwd_entry_t * lfe)
     {
       fi = ip_src_fib_add_route (lfe->src_fib_index, &ippref, lfe->paths);
     }
+done:
   fe = fib_entry_get (fi);
   return fe->fe_lb.dpoi_index;
 }