summaryrefslogtreecommitdiffstats
path: root/src/vnet
diff options
context:
space:
mode:
authorNeale Ranns <nranns@cisco.com>2018-07-10 03:00:07 -0700
committerDamjan Marion <dmarion@me.com>2018-07-10 21:22:53 +0000
commitde450cb3cca111c1c8545b41b9e83f1212465a92 (patch)
tree3d0d007869ffe036e8c582afcfb1fef500992e74 /src/vnet
parent8008d7cdfcf71389c98d2968070b8cda1ed433f9 (diff)
FIB path dump: fix next-hop-table ID for recursive routes
Change-Id: I57b4ebca29c0b185770373e8878f89a9bd13b742 Signed-off-by: Neale Ranns <nranns@cisco.com>
Diffstat (limited to 'src/vnet')
-rw-r--r--src/vnet/fib/fib_api.c3
-rw-r--r--src/vnet/fib/fib_path.c2
2 files changed, 3 insertions, 2 deletions
diff --git a/src/vnet/fib/fib_api.c b/src/vnet/fib/fib_api.c
index cea54a20b3d..eca5e614531 100644
--- a/src/vnet/fib/fib_api.c
+++ b/src/vnet/fib/fib_api.c
@@ -241,8 +241,7 @@ fib_api_path_encode (const fib_route_path_encode_t * api_rpath,
out->afi = api_rpath->rpath.frp_proto;
fib_api_path_copy_next_hop (api_rpath, out);
- if (~0 == api_rpath->rpath.frp_sw_if_index &&
- ip46_address_is_zero(&api_rpath->rpath.frp_addr))
+ if (0 != api_rpath->rpath.frp_fib_index)
{
if ((DPO_PROTO_IP6 == api_rpath->rpath.frp_proto) ||
(DPO_PROTO_IP4 == api_rpath->rpath.frp_proto))
diff --git a/src/vnet/fib/fib_path.c b/src/vnet/fib/fib_path.c
index 687e7167312..2912c6a76b7 100644
--- a/src/vnet/fib/fib_path.c
+++ b/src/vnet/fib/fib_path.c
@@ -2593,6 +2593,7 @@ 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->rpath.frp_fib_index = 0;
api_rpath->dpo = path->fp_dpo;
switch (path->fp_type)
@@ -2618,6 +2619,7 @@ fib_path_encode (fib_node_index_t path_list_index,
break;
case FIB_PATH_TYPE_RECURSIVE:
api_rpath->rpath.frp_addr = path->recursive.fp_nh.fp_ip;
+ api_rpath->rpath.frp_fib_index = path->recursive.fp_tbl_id;
break;
case FIB_PATH_TYPE_DVR:
api_rpath->rpath.frp_sw_if_index = path->dvr.fp_interface;