diff options
Diffstat (limited to 'src/vnet')
-rw-r--r-- | src/vnet/fib/fib_types.h | 4 | ||||
-rw-r--r-- | src/vnet/ip/ip.api | 10 | ||||
-rw-r--r-- | src/vnet/ip/ip_api.c | 10 | ||||
-rw-r--r-- | src/vnet/mfib/mfib_entry.c | 13 |
4 files changed, 31 insertions, 6 deletions
diff --git a/src/vnet/fib/fib_types.h b/src/vnet/fib/fib_types.h index 714a1d9e9a8..472ce888b4e 100644 --- a/src/vnet/fib/fib_types.h +++ b/src/vnet/fib/fib_types.h @@ -528,6 +528,10 @@ typedef struct fib_route_path_t_ { * Exclusive DPO */ dpo_id_t dpo; + /** + * MFIB interface flags + */ + u32 frp_mitf_flags; }; /** * A path that resolves via a BIER Table. diff --git a/src/vnet/ip/ip.api b/src/vnet/ip/ip.api index 4b418bea71f..025fd577cf5 100644 --- a/src/vnet/ip/ip.api +++ b/src/vnet/ip/ip.api @@ -502,6 +502,12 @@ define ip_mfib_dump @param count - the number of fib_path in path @param path - array of of fib_path structures */ +typedef mfib_path +{ + vl_api_fib_path_t path; + u32 itf_flags; +}; + manual_endian manual_print define ip_mfib_details { u32 context; @@ -513,7 +519,7 @@ manual_endian manual_print define ip_mfib_details u8 src_address[4]; u32 count; u32 stats_index; - vl_api_fib_path_t path[count]; + vl_api_mfib_path_t path[count]; }; /** \brief Dump IP6 multicast fib table @@ -541,7 +547,7 @@ manual_endian manual_print define ip6_mfib_details u8 grp_address[16]; u8 src_address[16]; u32 count; - vl_api_fib_path_t path[count]; + vl_api_mfib_path_t path[count]; }; define ip_address_details diff --git a/src/vnet/ip/ip_api.c b/src/vnet/ip/ip_api.c index d59aa23d7e5..f58ca079b04 100644 --- a/src/vnet/ip/ip_api.c +++ b/src/vnet/ip/ip_api.c @@ -410,7 +410,7 @@ send_ip_mfib_details (vl_api_registration_t * reg, vl_api_ip_mfib_details_t *mp; const mfib_prefix_t *pfx; mfib_entry_t *mfib_entry; - vl_api_fib_path_t *fp; + vl_api_mfib_path_t *fp; int path_count; mfib_entry = mfib_entry_get (mfei); @@ -438,7 +438,8 @@ send_ip_mfib_details (vl_api_registration_t * reg, fp = mp->path; vec_foreach (api_rpath, api_rpaths) { - fib_api_path_encode (api_rpath, fp); + fib_api_path_encode (api_rpath, &fp->path); + fp->itf_flags = ntohl (api_rpath->rpath.frp_mitf_flags); fp++; } vec_free (api_rpaths); @@ -508,7 +509,7 @@ send_ip6_mfib_details (vpe_api_main_t * am, { vl_api_ip6_mfib_details_t *mp; fib_route_path_encode_t *api_rpath; - vl_api_fib_path_t *fp; + vl_api_mfib_path_t *fp; int path_count; path_count = vec_len (api_rpaths); @@ -530,7 +531,8 @@ send_ip6_mfib_details (vpe_api_main_t * am, fp = mp->path; vec_foreach (api_rpath, api_rpaths) { - fib_api_path_encode (api_rpath, fp); + fib_api_path_encode (api_rpath, &fp->path); + fp->itf_flags = ntohl (api_rpath->rpath.frp_mitf_flags); fp++; } diff --git a/src/vnet/mfib/mfib_entry.c b/src/vnet/mfib/mfib_entry.c index 79d2f9a50a3..18562219ce2 100644 --- a/src/vnet/mfib/mfib_entry.c +++ b/src/vnet/mfib/mfib_entry.c @@ -1325,6 +1325,7 @@ void mfib_entry_encode (fib_node_index_t mfib_entry_index, fib_route_path_encode_t **api_rpaths) { + fib_route_path_encode_t *api_rpath; mfib_entry_t *mfib_entry; mfib_entry_src_t *bsrc; @@ -1338,6 +1339,18 @@ mfib_entry_encode (fib_node_index_t mfib_entry_index, fib_path_encode, api_rpaths); } + + vec_foreach(api_rpath, *api_rpaths) + { + mfib_itf_t *mfib_itf; + + mfib_itf = mfib_entry_itf_find(bsrc->mfes_itfs, + api_rpath->rpath.frp_sw_if_index); + if (mfib_itf) + { + api_rpath->rpath.frp_mitf_flags = mfib_itf->mfi_flags; + } + } } const mfib_prefix_t * |