FIB path weight incorrect in dump (VPP-922)
[vpp.git] / src / vnet / ip / ip_api.c
index d00ae76..4cbf75a 100644 (file)
@@ -231,7 +231,8 @@ send_ip_fib_details (vpe_api_main_t * am,
       default:
        break;
       }
-    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++;
@@ -357,8 +358,9 @@ send_ip6_fib_details (vpe_api_main_t * am,
       default:
        break;
       }
-    fp->weight = htonl (api_rpath->rpath.frp_weight);
-    fp->sw_if_index = htonl (api_rpath->rpath.frp_sw_if_index);
+    fp->weight = api_rpath->rpath.frp_weight;
+    fp->preference = api_rpath->rpath.frp_preference;
+    fp->sw_if_index = api_rpath->rpath.frp_sw_if_index;
     copy_fib_next_hop (api_rpath, fp);
     fp++;
   }