summaryrefslogtreecommitdiffstats
path: root/src/vnet/lisp-gpe/interface.c
diff options
context:
space:
mode:
authorNeale Ranns <nranns@cisco.com>2017-09-10 04:39:11 -0700
committerDamjan Marion <dmarion.lists@gmail.com>2017-09-11 10:14:36 +0000
commit1500254bee11355bbd69cc1dd9705be4f002f2bd (patch)
treec403642105f399baccb3a727020232b5732fe8f7 /src/vnet/lisp-gpe/interface.c
parenta7191840beeb2c3a0f2598707ed1051a9f23c45f (diff)
FIB table add/delete API
part 2; - this adds the code to create an IP and MPLS table via the API. - but the enforcement that the table must be created before it is used is still missing, this is so that CSIT can pass. Change-Id: Id124d884ade6cb7da947225200e3bb193454c555 Signed-off-by: Neale Ranns <nranns@cisco.com>
Diffstat (limited to 'src/vnet/lisp-gpe/interface.c')
-rw-r--r--src/vnet/lisp-gpe/interface.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/vnet/lisp-gpe/interface.c b/src/vnet/lisp-gpe/interface.c
index e832c23fd8e..a0c05e85682 100644
--- a/src/vnet/lisp-gpe/interface.c
+++ b/src/vnet/lisp-gpe/interface.c
@@ -505,12 +505,14 @@ lisp_gpe_iface_set_table (u32 sw_if_index, u32 table_id)
{
fib_node_index_t fib_index;
- fib_index = fib_table_find_or_create_and_lock (FIB_PROTOCOL_IP4, table_id);
+ fib_index = fib_table_find_or_create_and_lock (FIB_PROTOCOL_IP4, table_id,
+ FIB_SOURCE_LISP);
vec_validate (ip4_main.fib_index_by_sw_if_index, sw_if_index);
ip4_main.fib_index_by_sw_if_index[sw_if_index] = fib_index;
ip4_sw_interface_enable_disable (sw_if_index, 1);
- fib_index = fib_table_find_or_create_and_lock (FIB_PROTOCOL_IP6, table_id);
+ fib_index = fib_table_find_or_create_and_lock (FIB_PROTOCOL_IP6, table_id,
+ FIB_SOURCE_LISP);
vec_validate (ip6_main.fib_index_by_sw_if_index, sw_if_index);
ip6_main.fib_index_by_sw_if_index[sw_if_index] = fib_index;
ip6_sw_interface_enable_disable (sw_if_index, 1);
@@ -530,7 +532,7 @@ lisp_gpe_tenant_del_default_routes (u32 table_id)
fib_index = fib_table_find (prefix.fp_proto, table_id);
fib_table_entry_special_remove (fib_index, &prefix, FIB_SOURCE_LISP);
- fib_table_unlock (fib_index, prefix.fp_proto);
+ fib_table_unlock (fib_index, prefix.fp_proto, FIB_SOURCE_LISP);
}
}
@@ -549,7 +551,8 @@ lisp_gpe_tenant_add_default_routes (u32 table_id)
/*
* Add a deafult route that results in a control plane punt DPO
*/
- fib_index = fib_table_find_or_create_and_lock (prefix.fp_proto, table_id);
+ fib_index = fib_table_find_or_create_and_lock (prefix.fp_proto, table_id,
+ FIB_SOURCE_LISP);
fib_table_entry_special_dpo_add (fib_index, &prefix, FIB_SOURCE_LISP,
FIB_ENTRY_FLAG_EXCLUSIVE,
lisp_cp_dpo_get (fib_proto_to_dpo