aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/gbp/gbp_ext_itf.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/gbp/gbp_ext_itf.c')
-rw-r--r--src/plugins/gbp/gbp_ext_itf.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/plugins/gbp/gbp_ext_itf.c b/src/plugins/gbp/gbp_ext_itf.c
index 57ff625d64a..16cdaa87b77 100644
--- a/src/plugins/gbp/gbp_ext_itf.c
+++ b/src/plugins/gbp/gbp_ext_itf.c
@@ -113,6 +113,9 @@ gbp_ext_itf_delete (u32 sw_if_index)
gbp_ext_itf_t *gx;
index_t gxi;
+ if (vec_len (gbp_ext_itf_db) <= sw_if_index)
+ return (VNET_API_ERROR_INVALID_SW_IF_INDEX);
+
gxi = gbp_ext_itf_db[sw_if_index];
if (INDEX_INVALID != gxi)