diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/plugins/dpdk/device/flow.c | 2 | ||||
-rw-r--r-- | src/vnet/flow/flow.c | 6 |
2 files changed, 6 insertions, 2 deletions
diff --git a/src/plugins/dpdk/device/flow.c b/src/plugins/dpdk/device/flow.c index 7938568a9c3..c20da251884 100644 --- a/src/plugins/dpdk/device/flow.c +++ b/src/plugins/dpdk/device/flow.c @@ -513,8 +513,6 @@ dpdk_flow_ops_fn (vnet_main_t * vnm, vnet_flow_dev_op_t op, u32 dev_instance, if (op == VNET_FLOW_DEV_OP_DEL_FLOW) { - ASSERT (*private_data >= vec_len (xd->flow_entries)); - fe = vec_elt_at_index (xd->flow_entries, *private_data); if ((rv = rte_flow_destroy (xd->device_index, fe->handle, diff --git a/src/vnet/flow/flow.c b/src/vnet/flow/flow.c index 4d867fee365..9b6a376af3e 100644 --- a/src/vnet/flow/flow.c +++ b/src/vnet/flow/flow.c @@ -96,6 +96,9 @@ vnet_flow_enable (vnet_main_t * vnm, u32 flow_index, u32 hw_if_index) uword private_data; int rv; + if (f == 0) + return VNET_FLOW_ERROR_NO_SUCH_ENTRY; + if (!vnet_hw_interface_is_valid (vnm, hw_if_index)) return VNET_FLOW_ERROR_NO_SUCH_INTERFACE; @@ -137,6 +140,9 @@ vnet_flow_disable (vnet_main_t * vnm, u32 flow_index, u32 hw_if_index) uword *p; int rv; + if (f == 0) + return VNET_FLOW_ERROR_NO_SUCH_ENTRY; + if (!vnet_hw_interface_is_valid (vnm, hw_if_index)) return VNET_FLOW_ERROR_NO_SUCH_INTERFACE; |