memif: VPP-1172: Ensure memif_create reply contains sw_if_index
[vpp.git] / src / plugins / memif / memif_api.c
index a48cd18..6cb48a8 100644 (file)
@@ -224,7 +224,12 @@ vl_api_memif_create_t_handler (vl_api_memif_create_t * mp)
   vec_free (args.secret);
 
 reply:
-  REPLY_MACRO (VL_API_MEMIF_CREATE_REPLY);
+  /* *INDENT-OFF* */
+  REPLY_MACRO2 (VL_API_MEMIF_CREATE_REPLY,
+    ({
+      rmp->sw_if_index = htonl (args.sw_if_index);
+    }));
+  /* *INDENT-ON* */
 }
 
 /**