aboutsummaryrefslogtreecommitdiffstats
path: root/src/vnet/l2/l2_api.c
diff options
context:
space:
mode:
authorNeale Ranns <nranns@cisco.com>2018-07-23 05:47:09 -0400
committerDave Barach <openvpp@barachs.net>2018-07-23 19:58:46 +0000
commit6b9b41c832332e9e9876edad51917230e4e9a4af (patch)
treebb23451e78af49e1cfdd5e473e9e532038c59075 /src/vnet/l2/l2_api.c
parentc79396e1f8ba395f3d6625f463cd9a6c8d505799 (diff)
L2 EFP: byteswap sw_if_index, enable flag can be u8 on .api
Change-Id: Ib99d02e84e468726feae4c386733da405b298e4f Signed-off-by: Neale Ranns <nranns@cisco.com>
Diffstat (limited to 'src/vnet/l2/l2_api.c')
-rw-r--r--src/vnet/l2/l2_api.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/vnet/l2/l2_api.c b/src/vnet/l2/l2_api.c
index ebb64ff2420..be3b75e9658 100644
--- a/src/vnet/l2/l2_api.c
+++ b/src/vnet/l2/l2_api.c
@@ -734,7 +734,7 @@ out:
}
extern void l2_efp_filter_configure (vnet_main_t * vnet_main,
- u32 sw_if_index, u32 enable);
+ u32 sw_if_index, u8 enable);
static void
vl_api_l2_interface_efp_filter_t_handler (vl_api_l2_interface_efp_filter_t *
@@ -744,10 +744,13 @@ vl_api_l2_interface_efp_filter_t_handler (vl_api_l2_interface_efp_filter_t *
vl_api_l2_interface_efp_filter_reply_t *rmp;
vnet_main_t *vnm = vnet_get_main ();
+ VALIDATE_SW_IF_INDEX (mp);
+
// enable/disable the feature
- l2_efp_filter_configure (vnm, mp->sw_if_index, mp->enable_disable);
+ l2_efp_filter_configure (vnm, ntohl (mp->sw_if_index), mp->enable_disable);
rv = vnm->api_errno;
+ BAD_SW_IF_INDEX_LABEL;
REPLY_MACRO (VL_API_L2_INTERFACE_EFP_FILTER_REPLY);
}