summaryrefslogtreecommitdiffstats
path: root/src/vnet
diff options
context:
space:
mode:
Diffstat (limited to 'src/vnet')
-rw-r--r--src/vnet/classify/classify_api.c8
-rw-r--r--src/vnet/ethernet/node.c4
2 files changed, 5 insertions, 7 deletions
diff --git a/src/vnet/classify/classify_api.c b/src/vnet/classify/classify_api.c
index 4b182ca9a0a..7c08528f58a 100644
--- a/src/vnet/classify/classify_api.c
+++ b/src/vnet/classify/classify_api.c
@@ -101,11 +101,9 @@ static void vl_api_classify_pcap_lookup_table_t_handler
u32 mask_len = ntohl (mp->mask_len);
u32 sw_if_index = ntohl (mp->sw_if_index);
- if (n_skip > 5
- || 0 <= n_match || n_match > 5
- || mask_len != n_match * sizeof (u32x4)
- || sw_if_index == ~0
- || sw_if_index >= vec_len (cm->classify_table_index_by_sw_if_index))
+ if (n_skip > 5 || n_match == 0 || n_match > 5 ||
+ mask_len != n_match * sizeof (u32x4) || sw_if_index == ~0 ||
+ sw_if_index >= vec_len (cm->classify_table_index_by_sw_if_index))
{
rv = VNET_API_ERROR_INVALID_VALUE;
goto out;
diff --git a/src/vnet/ethernet/node.c b/src/vnet/ethernet/node.c
index efe7290d19a..f4f84f8ca45 100644
--- a/src/vnet/ethernet/node.c
+++ b/src/vnet/ethernet/node.c
@@ -1340,7 +1340,7 @@ ethernet_input_inline (vlib_main_t * vm,
}
else
{
- if (ei->flags & ETHERNET_INTERFACE_FLAG_STATUS_L3)
+ if (ei && (ei->flags & ETHERNET_INTERFACE_FLAG_STATUS_L3))
goto skip_dmac_check01;
dmacs[0] = *(u64 *) e0;
@@ -1584,7 +1584,7 @@ ethernet_input_inline (vlib_main_t * vm,
}
else
{
- if (ei->flags & ETHERNET_INTERFACE_FLAG_STATUS_L3)
+ if (ei && ei->flags & ETHERNET_INTERFACE_FLAG_STATUS_L3)
goto skip_dmac_check0;
dmacs[0] = *(u64 *) e0;