IP FIB dump - incorrect table-ID for deag paths
[vpp.git] / src / vnet / fib / fib_api.c
index a180cb9..cea54a2 100644 (file)
@@ -242,10 +242,10 @@ fib_api_path_encode (const fib_route_path_encode_t * api_rpath,
     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))
+        ip46_address_is_zero(&api_rpath->rpath.frp_addr))
     {
         if ((DPO_PROTO_IP6 == api_rpath->rpath.frp_proto) ||
-            (DPO_PROTO_IP6 == api_rpath->rpath.frp_proto))
+            (DPO_PROTO_IP4 == api_rpath->rpath.frp_proto))
         {
             fib_table_t *fib;
 
@@ -266,3 +266,4 @@ fib_api_path_encode (const fib_route_path_encode_t * api_rpath,
         out->next_hop_id = api_rpath->rpath.frp_udp_encap_id;
     }
 }
+