VPP-323: Add LISP locator set index to reply API message
[vpp.git] / vpp / vpp-api / api.c
index e142be6..17893f1 100644 (file)
@@ -1455,10 +1455,14 @@ vl_api_sw_interface_set_vpath_t_handler (vl_api_sw_interface_set_vpath_t * mp)
   ip6_main_t *ip6m = &ip6_main;
   ip_lookup_main_t *ip4lm = &ip4m->lookup_main;
   ip_lookup_main_t *ip6lm = &ip6m->lookup_main;
-  ip_config_main_t *rx_cm4u = &ip4lm->rx_config_mains[VNET_UNICAST];
-  ip_config_main_t *rx_cm4m = &ip4lm->rx_config_mains[VNET_MULTICAST];
-  ip_config_main_t *rx_cm6u = &ip6lm->rx_config_mains[VNET_UNICAST];
-  ip_config_main_t *rx_cm6m = &ip6lm->rx_config_mains[VNET_MULTICAST];
+  ip_config_main_t *rx_cm4u =
+    &ip4lm->feature_config_mains[VNET_IP_RX_UNICAST_FEAT];
+  ip_config_main_t *rx_cm4m =
+    &ip4lm->feature_config_mains[VNET_IP_RX_MULTICAST_FEAT];
+  ip_config_main_t *rx_cm6u =
+    &ip6lm->feature_config_mains[VNET_IP_RX_UNICAST_FEAT];
+  ip_config_main_t *rx_cm6m =
+    &ip6lm->feature_config_mains[VNET_IP_RX_MULTICAST_FEAT];
 
   VALIDATE_SW_IF_INDEX (mp);
 
@@ -5156,7 +5160,12 @@ vl_api_lisp_add_del_locator_set_t_handler (vl_api_lisp_add_del_locator_set_t *
   vec_free (locator_name);
   vec_free (a->locators);
 
-  REPLY_MACRO (VL_API_LISP_ADD_DEL_LOCATOR_SET_REPLY);
+  /* *INDENT-OFF* */
+  REPLY_MACRO2 (VL_API_LISP_ADD_DEL_LOCATOR_SET_REPLY,
+  ({
+    rmp->ls_index = clib_host_to_net_u32 (ls_index);
+  }));
+  /* *INDENT-ON* */
 }
 
 static void
@@ -5499,7 +5508,7 @@ static void
   /* NOTE: for now this works as a static remote mapping, i.e.,
    * not authoritative and ttl infinite. */
   rv = vnet_lisp_add_del_mapping (eid, rlocs, mp->action, 0, ~0,
-                                 mp->is_add, 0);
+                                 mp->is_add, 1 /* is_static */ , 0);
 
   if (mp->del_all)
     vnet_lisp_clear_all_remote_adjacencies ();