FIB path weight incorrect in dump (VPP-922)
[vpp.git] / src / vnet / fib / fib_path.c
index a32baf2..3a67a54 100644 (file)
@@ -198,13 +198,14 @@ typedef struct fib_path_t_ {
     /**
      * UCMP [unnormalised] weigth
      */
-    u16 fp_weight;
+    u8 fp_weight;
+
     /**
      * A path preference. 0 is the best.
      * Only paths of the best preference, that are 'up', are considered
      * for forwarding.
      */
-    u16 fp_preference;
+    u8 fp_preference;
 
     /**
      * per-type union of the data required to resolve the path
@@ -2163,9 +2164,11 @@ fib_path_encode (fib_node_index_t path_list_index,
       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;