aboutsummaryrefslogtreecommitdiffstats
path: root/src/vnet
diff options
context:
space:
mode:
authorFlorin Coras <fcoras@cisco.com>2017-06-15 15:07:32 -0700
committerDamjan Marion <dmarion.lists@gmail.com>2017-06-16 18:14:00 +0000
commitf53a8adf13175a376913e63b13671b2d8ad6377d (patch)
treecb5b8f486efb4db7b6200bc0c08034a828b537db /src/vnet
parentb5c29f9c2218e6242d5f126bc490abf27fd39f4c (diff)
Fix vni/dp_table endianness for gpe iface addition (VPP-882)
Change-Id: I2b78dad740b67fc05b0e2cf9c180809bc0962cd5 Signed-off-by: Florin Coras <fcoras@cisco.com>
Diffstat (limited to 'src/vnet')
-rw-r--r--src/vnet/lisp-gpe/lisp_gpe_api.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/src/vnet/lisp-gpe/lisp_gpe_api.c b/src/vnet/lisp-gpe/lisp_gpe_api.c
index 364bee0c439..f1663699ae6 100644
--- a/src/vnet/lisp-gpe/lisp_gpe_api.c
+++ b/src/vnet/lisp-gpe/lisp_gpe_api.c
@@ -386,28 +386,30 @@ vl_api_gpe_add_del_iface_t_handler (vl_api_gpe_add_del_iface_t * mp)
{
vl_api_gpe_add_del_iface_reply_t *rmp;
int rv = 0;
+ u32 vni, dp_table;
+
+ vni = clib_net_to_host_u32 (mp->vni);
+ dp_table = clib_net_to_host_u32 (mp->dp_table);
if (mp->is_l2)
{
if (mp->is_add)
{
- if (~0 ==
- lisp_gpe_tenant_l2_iface_add_or_lock (mp->vni, mp->dp_table))
+ if (~0 == lisp_gpe_tenant_l2_iface_add_or_lock (vni, dp_table))
rv = 1;
}
else
- lisp_gpe_tenant_l2_iface_unlock (mp->vni);
+ lisp_gpe_tenant_l2_iface_unlock (vni);
}
else
{
if (mp->is_add)
{
- if (~0 ==
- lisp_gpe_tenant_l3_iface_add_or_lock (mp->vni, mp->dp_table))
+ if (~0 == lisp_gpe_tenant_l3_iface_add_or_lock (vni, dp_table))
rv = 1;
}
else
- lisp_gpe_tenant_l3_iface_unlock (mp->vni);
+ lisp_gpe_tenant_l3_iface_unlock (vni);
}
REPLY_MACRO (VL_API_GPE_ADD_DEL_IFACE_REPLY);