summaryrefslogtreecommitdiffstats
path: root/src/vnet/lisp-gpe
diff options
context:
space:
mode:
Diffstat (limited to 'src/vnet/lisp-gpe')
-rw-r--r--src/vnet/lisp-gpe/lisp_gpe.c13
-rw-r--r--src/vnet/lisp-gpe/lisp_gpe_api.c10
-rw-r--r--src/vnet/lisp-gpe/lisp_gpe_fwd_entry.c5
3 files changed, 15 insertions, 13 deletions
diff --git a/src/vnet/lisp-gpe/lisp_gpe.c b/src/vnet/lisp-gpe/lisp_gpe.c
index 0acc73491b9..018895ad911 100644
--- a/src/vnet/lisp-gpe/lisp_gpe.c
+++ b/src/vnet/lisp-gpe/lisp_gpe.c
@@ -454,7 +454,7 @@ vnet_gpe_add_del_native_fwd_rpath (vnet_gpe_native_fwd_rpath_args_t * a)
fib_route_path_t *rpath;
u8 ip_version;
- ip_version = a->rpath.frp_proto == FIB_PROTOCOL_IP4 ? IP4 : IP6;
+ ip_version = a->rpath.frp_proto == DPO_PROTO_IP4 ? IP4 : IP6;
if (a->is_add)
{
@@ -511,7 +511,7 @@ gpe_native_forward_command_fn (vlib_main_t * vm, unformat_input_t * input,
&rpath.frp_sw_if_index))
{
rpath.frp_weight = 1;
- rpath.frp_proto = FIB_PROTOCOL_IP4;
+ rpath.frp_proto = DPO_PROTO_IP4;
}
else if (unformat (line_input, "via %U %U",
unformat_ip6_address,
@@ -520,21 +520,21 @@ gpe_native_forward_command_fn (vlib_main_t * vm, unformat_input_t * input,
&rpath.frp_sw_if_index))
{
rpath.frp_weight = 1;
- rpath.frp_proto = FIB_PROTOCOL_IP6;
+ rpath.frp_proto = DPO_PROTO_IP6;
}
else if (unformat (line_input, "via %U",
unformat_ip4_address, &rpath.frp_addr.ip4))
{
rpath.frp_weight = 1;
rpath.frp_sw_if_index = ~0;
- rpath.frp_proto = FIB_PROTOCOL_IP4;
+ rpath.frp_proto = DPO_PROTO_IP4;
}
else if (unformat (line_input, "via %U",
unformat_ip6_address, &rpath.frp_addr.ip6))
{
rpath.frp_weight = 1;
rpath.frp_sw_if_index = ~0;
- rpath.frp_proto = FIB_PROTOCOL_IP6;
+ rpath.frp_proto = DPO_PROTO_IP6;
}
else
{
@@ -549,7 +549,8 @@ gpe_native_forward_command_fn (vlib_main_t * vm, unformat_input_t * input,
}
else
{
- rpath.frp_fib_index = fib_table_find (rpath.frp_proto, table_id);
+ rpath.frp_fib_index =
+ fib_table_find (dpo_proto_to_fib (rpath.frp_proto), table_id);
if ((u32) ~ 0 == rpath.frp_fib_index)
{
error = clib_error_return (0, "Nonexistent table id %d", table_id);
diff --git a/src/vnet/lisp-gpe/lisp_gpe_api.c b/src/vnet/lisp-gpe/lisp_gpe_api.c
index f1663699ae6..4367a7194d9 100644
--- a/src/vnet/lisp-gpe/lisp_gpe_api.c
+++ b/src/vnet/lisp-gpe/lisp_gpe_api.c
@@ -455,10 +455,10 @@ static void
clib_memcpy (&a->rpath.frp_addr.ip6, mp->nh_addr, sizeof (ip6_address_t));
a->is_add = mp->is_add;
- a->rpath.frp_proto = mp->is_ip4 ? FIB_PROTOCOL_IP4 : FIB_PROTOCOL_IP6;
- a->rpath.frp_fib_index = fib_table_find (a->rpath.frp_proto,
- clib_net_to_host_u32
- (mp->table_id));
+ a->rpath.frp_proto = mp->is_ip4 ? DPO_PROTO_IP4 : DPO_PROTO_IP6;
+ a->rpath.frp_fib_index =
+ fib_table_find (dpo_proto_to_fib (a->rpath.frp_proto),
+ clib_net_to_host_u32 (mp->table_id));
if (~0 == a->rpath.frp_fib_index)
{
rv = VNET_API_ERROR_INVALID_VALUE;
@@ -484,7 +484,7 @@ gpe_native_fwd_rpaths_copy (vl_api_gpe_native_fwd_rpath_t * dst,
vec_foreach (e, src)
{
memset (&dst[i], 0, sizeof (*dst));
- table = fib_table_get (e->frp_fib_index, e->frp_proto);
+ table = fib_table_get (e->frp_fib_index, dpo_proto_to_fib (e->frp_proto));
dst[i].fib_index = table->ft_table_id;
dst[i].nh_sw_if_index = e->frp_sw_if_index;
dst[i].is_ip4 = is_ip4;
diff --git a/src/vnet/lisp-gpe/lisp_gpe_fwd_entry.c b/src/vnet/lisp-gpe/lisp_gpe_fwd_entry.c
index 395b493a719..ac04814999e 100644
--- a/src/vnet/lisp-gpe/lisp_gpe_fwd_entry.c
+++ b/src/vnet/lisp-gpe/lisp_gpe_fwd_entry.c
@@ -225,6 +225,7 @@ lisp_gpe_mk_fib_paths (const lisp_fwd_path_t * paths)
{
const lisp_gpe_adjacency_t *ladj;
fib_route_path_t *rpaths = NULL;
+ fib_protocol_t fp;
u8 best_priority;
u32 ii;
@@ -239,9 +240,9 @@ lisp_gpe_mk_fib_paths (const lisp_fwd_path_t * paths)
ladj = lisp_gpe_adjacency_get (paths[ii].lisp_adj);
- ip_address_to_46 (&ladj->remote_rloc,
- &rpaths[ii].frp_addr, &rpaths[ii].frp_proto);
+ ip_address_to_46 (&ladj->remote_rloc, &rpaths[ii].frp_addr, &fp);
+ rpaths[ii].frp_proto = fib_proto_to_dpo (fp);
rpaths[ii].frp_sw_if_index = ladj->sw_if_index;
rpaths[ii].frp_weight = (paths[ii].weight ? paths[ii].weight : 1);
}