summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/vnet/l2/l2.api2
-rw-r--r--src/vnet/l2/l2_api.c7
-rw-r--r--src/vnet/l2/l2_efp_filter.c2
3 files changed, 7 insertions, 4 deletions
diff --git a/src/vnet/l2/l2.api b/src/vnet/l2/l2.api
index 0ff4a2d75e4..05b250bd885 100644
--- a/src/vnet/l2/l2.api
+++ b/src/vnet/l2/l2.api
@@ -470,7 +470,7 @@ autoreply define l2_interface_efp_filter
u32 client_index;
u32 context;
u32 sw_if_index;
- u32 enable_disable;
+ u8 enable_disable;
};
/** \brief Interface set vpath request
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);
}
diff --git a/src/vnet/l2/l2_efp_filter.c b/src/vnet/l2/l2_efp_filter.c
index faf78153448..59f9f515d47 100644
--- a/src/vnet/l2/l2_efp_filter.c
+++ b/src/vnet/l2/l2_efp_filter.c
@@ -502,7 +502,7 @@ VLIB_INIT_FUNCTION (l2_efp_filter_init);
/** Enable/disable the EFP Filter check on the subinterface. */
void
-l2_efp_filter_configure (vnet_main_t * vnet_main, u32 sw_if_index, u32 enable)
+l2_efp_filter_configure (vnet_main_t * vnet_main, u32 sw_if_index, u8 enable)
{
/* set the interface flag */
l2output_intf_bitmap_enable (sw_if_index, L2OUTPUT_FEAT_EFP_FILTER, enable);