memif: VPP-1172: Ensure memif_create reply contains sw_if_index 11/10611/1
authorJon Loeliger <jdl@netgate.com>
Fri, 16 Feb 2018 15:55:30 +0000 (09:55 -0600)
committerJon Loeliger <jdl@netgate.com>
Fri, 16 Feb 2018 15:57:23 +0000 (09:57 -0600)
Change-Id: If5cd2e913770adac4e7320f54584da63012f925d
Signed-off-by: Jon Loeliger <jdl@netgate.com>
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* */
 }
 
 /**