FIB path weight incorrect in dump (VPP-922)
Change-Id: I655f41878ca3595681d0255782b0faba01c9824b
Signed-off-by: Neale Ranns <nranns@cisco.com>
diff --git a/src/vnet/mpls/mpls.api b/src/vnet/mpls/mpls.api
index 61d7fe6..67f1045 100644
--- a/src/vnet/mpls/mpls.api
+++ b/src/vnet/mpls/mpls.api
@@ -112,7 +112,8 @@
typeonly manual_print manual_endian define fib_path2
{
u32 sw_if_index;
- u32 weight;
+ u8 weight;
+ u8 preference;
u8 is_local;
u8 is_drop;
u8 is_unreach;
diff --git a/src/vnet/mpls/mpls_api.c b/src/vnet/mpls/mpls_api.c
index 22fb7d4..92fb24a 100644
--- a/src/vnet/mpls/mpls_api.c
+++ b/src/vnet/mpls/mpls_api.c
@@ -334,7 +334,8 @@
{
memset (fp, 0, sizeof (*fp));
- fp->weight = htonl (api_rpath->rpath.frp_weight);
+ fp->weight = api_rpath->rpath.frp_weight;
+ fp->preference = api_rpath->rpath.frp_preference;
fp->sw_if_index = htonl (api_rpath->rpath.frp_sw_if_index);
copy_fib_next_hop (api_rpath, fp);
fp++;
@@ -393,7 +394,8 @@
vec_foreach (api_rpath, api_rpaths)
{
memset (fp, 0, sizeof (*fp));
- fp->weight = htonl (api_rpath->rpath.frp_weight);
+ fp->weight = api_rpath->rpath.frp_weight;
+ fp->preference = api_rpath->rpath.frp_preference;
fp->sw_if_index = htonl (api_rpath->rpath.frp_sw_if_index);
copy_fib_next_hop (api_rpath, fp);
fp++;