aboutsummaryrefslogtreecommitdiffstats
path: root/src/vnet/interface_api.c
diff options
context:
space:
mode:
authorNeale Ranns <nranns@cisco.com>2019-06-14 08:26:21 +0000
committerNeale Ranns <nranns@cisco.com>2019-06-14 10:15:58 +0000
commitf5b017615d25b8fb8760fa6b9b7e4249d93c6564 (patch)
tree58fe1299064802383fac23bbcad57e37cd5bf07f /src/vnet/interface_api.c
parentff34b916a932ed11cc2867baccfd84c407e54c0e (diff)
interface: interface dump API check validity of sw_if_index
Type: fix Fixes: 6407ba56 Change-Id: I6d3ce68962986921e04aa00c989d8afa157ebcb8 Signed-off-by: Neale Ranns <nranns@cisco.com>
Diffstat (limited to 'src/vnet/interface_api.c')
-rw-r--r--src/vnet/interface_api.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/vnet/interface_api.c b/src/vnet/interface_api.c
index a91936f72de..50921f24e3f 100644
--- a/src/vnet/interface_api.c
+++ b/src/vnet/interface_api.c
@@ -311,7 +311,7 @@ vl_api_sw_interface_dump_t_handler (vl_api_sw_interface_dump_t * mp)
if (!mp->name_filter_valid && sw_if_index != ~0 && sw_if_index != 0)
{
/* is it a valid sw_if_index? */
- if (vec_len (im->sw_interfaces) <= sw_if_index)
+ if (!vnet_sw_if_index_is_api_valid (sw_if_index))
return;
swif = vec_elt_at_index (im->sw_interfaces, sw_if_index);