X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=src%2Fvnet%2Fflow%2Fflow.c;h=9b6a376af3e382c2225a33bb37793cb54904bc92;hb=be2ad0b4743ed8a3875a5b6039c10c66eb07614c;hp=4d867fee3650243bbce4d8942d6f87105b23b573;hpb=7dbf9a1a4fff5c3b20ad972289e49e3f88e82f2d;p=vpp.git 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;