diff options
Diffstat (limited to 'src/vnet/policer')
-rw-r--r-- | src/vnet/policer/policer.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/vnet/policer/policer.c b/src/vnet/policer/policer.c index eb7d40a340a..1c575c84ccd 100644 --- a/src/vnet/policer/policer.c +++ b/src/vnet/policer/policer.c @@ -226,6 +226,9 @@ policer_input (u32 policer_index, u32 sw_if_index, vlib_dir_t dir, bool apply) { vnet_policer_main_t *pm = &vnet_policer_main; + if (pool_is_free_index (pm->policers, policer_index)) + return VNET_API_ERROR_NO_SUCH_ENTRY; + if (apply) { vec_validate (pm->policer_index_by_sw_if_index[dir], sw_if_index); |