session: swap appns secret to host byte order
Change-Id: I355433e0f07b328c441ed642705b31ca5157fabe
Signed-off-by: Florin Coras <fcoras@cisco.com>
diff --git a/src/vat/api_format.c b/src/vat/api_format.c
index d8f7209..dd3cbf7 100644
--- a/src/vat/api_format.c
+++ b/src/vat/api_format.c
@@ -20984,7 +20984,7 @@
clib_memcpy (mp->namespace_id, ns_id, vec_len (ns_id));
mp->namespace_id_len = vec_len (ns_id);
- mp->secret = secret;
+ mp->secret = clib_host_to_net_u64 (secret);
mp->sw_if_index = clib_host_to_net_u32 (sw_if_index);
mp->ip4_fib_id = clib_host_to_net_u32 (ip4_fib_id);
mp->ip6_fib_id = clib_host_to_net_u32 (ip6_fib_id);
diff --git a/src/vnet/session/session_api.c b/src/vnet/session/session_api.c
index e8fa8aa..181312c 100755
--- a/src/vnet/session/session_api.c
+++ b/src/vnet/session/session_api.c
@@ -761,7 +761,7 @@
clib_memcpy (ns_id, mp->namespace_id, mp->namespace_id_len);
vnet_app_namespace_add_del_args_t args = {
.ns_id = ns_id,
- .secret = mp->secret,
+ .secret = clib_net_to_host_u64 (mp->secret),
.sw_if_index = clib_net_to_host_u32 (mp->sw_if_index),
.ip4_fib_id = clib_net_to_host_u32 (mp->ip4_fib_id),
.ip6_fib_id = clib_net_to_host_u32 (mp->ip6_fib_id),