aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorNeale Ranns <neale.ranns@cisco.com>2017-11-14 08:10:41 -0800
committerNeale Ranns <nranns@cisco.com>2017-11-14 19:25:46 +0000
commita161a6dedb1aa3aba00109d325d2909051a3c987 (patch)
tree77913f8a63a5e4f9a12e35b77be175bd16530e63 /src
parentbf024e65a1ddb2b9e8b1e853a82dc6f8be9426ea (diff)
Ip6 dump not showing fib table names (VPP-1063)
Change-Id: Idc7e7c35f17d514589d1264f1d1be664192ee586 Signed-off-by: Neale Ranns <neale.ranns@cisco.com>
Diffstat (limited to 'src')
-rw-r--r--src/vnet/fib/fib_path.c7
-rw-r--r--src/vnet/ip/ip_api.c11
2 files changed, 9 insertions, 9 deletions
diff --git a/src/vnet/fib/fib_path.c b/src/vnet/fib/fib_path.c
index 8dabfdf9674..79291ca8c9a 100644
--- a/src/vnet/fib/fib_path.c
+++ b/src/vnet/fib/fib_path.c
@@ -2609,17 +2609,16 @@ fib_path_encode (fib_node_index_t path_list_index,
api_rpath->rpath.frp_preference = path->fp_preference;
api_rpath->rpath.frp_proto = path->fp_nh_proto;
api_rpath->rpath.frp_sw_if_index = ~0;
- api_rpath->dpo = path->exclusive.fp_ex_dpo;
+ api_rpath->dpo = path->fp_dpo;
+
switch (path->fp_type)
{
case FIB_PATH_TYPE_RECEIVE:
api_rpath->rpath.frp_addr = path->receive.fp_addr;
api_rpath->rpath.frp_sw_if_index = path->receive.fp_interface;
- api_rpath->dpo = path->fp_dpo;
break;
case FIB_PATH_TYPE_ATTACHED:
api_rpath->rpath.frp_sw_if_index = path->attached.fp_interface;
- api_rpath->dpo = path->fp_dpo;
break;
case FIB_PATH_TYPE_ATTACHED_NEXT_HOP:
api_rpath->rpath.frp_sw_if_index = path->attached_next_hop.fp_interface;
@@ -2633,7 +2632,6 @@ fib_path_encode (fib_node_index_t path_list_index,
break;
case FIB_PATH_TYPE_DEAG:
api_rpath->rpath.frp_fib_index = path->deag.fp_tbl_id;
- api_rpath->dpo = path->fp_dpo;
break;
case FIB_PATH_TYPE_RECURSIVE:
api_rpath->rpath.frp_addr = path->recursive.fp_nh.fp_ip;
@@ -2641,6 +2639,7 @@ fib_path_encode (fib_node_index_t path_list_index,
default:
break;
}
+
return (FIB_PATH_LIST_WALK_CONTINUE);
}
diff --git a/src/vnet/ip/ip_api.c b/src/vnet/ip/ip_api.c
index 5165927306f..7aec411e2a2 100644
--- a/src/vnet/ip/ip_api.c
+++ b/src/vnet/ip/ip_api.c
@@ -331,7 +331,8 @@ vl_api_ip_fib_dump_t_handler (vl_api_ip_fib_dump_t * mp)
static void
send_ip6_fib_details (vpe_api_main_t * am,
unix_shared_memory_queue_t * q,
- u32 table_id, fib_prefix_t * pfx,
+ const fib_table_t * table,
+ const fib_prefix_t * pfx,
fib_route_path_encode_t * api_rpaths, u32 context)
{
vl_api_ip6_fib_details_t *mp;
@@ -347,9 +348,11 @@ send_ip6_fib_details (vpe_api_main_t * am,
mp->_vl_msg_id = ntohs (VL_API_IP6_FIB_DETAILS);
mp->context = context;
- mp->table_id = htonl (table_id);
+ mp->table_id = htonl (table->ft_table_id);
mp->address_length = pfx->fp_len;
memcpy (mp->address, &pfx->fp_addr.ip6, sizeof (pfx->fp_addr.ip6));
+ memcpy (mp->table_name, table->ft_desc,
+ clib_min (vec_len (table->ft_desc), sizeof (mp->table_name)));
mp->count = htonl (path_count);
fp = mp->path;
@@ -436,9 +439,7 @@ api_ip6_fib_table_get_all (unix_shared_memory_queue_t * q,
fib_entry_get_prefix (*fib_entry_index, &pfx);
api_rpaths = NULL;
fib_entry_encode (*fib_entry_index, &api_rpaths);
- send_ip6_fib_details (am, q,
- fib_table->ft_table_id,
- &pfx, api_rpaths, mp->context);
+ send_ip6_fib_details (am, q, fib_table, &pfx, api_rpaths, mp->context);
vec_free (api_rpaths);
}