summaryrefslogtreecommitdiffstats
path: root/src/vnet/devices/tap/tapv2_api.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/vnet/devices/tap/tapv2_api.c')
-rw-r--r--src/vnet/devices/tap/tapv2_api.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/vnet/devices/tap/tapv2_api.c b/src/vnet/devices/tap/tapv2_api.c
index 9e09459c9ab..05679377d2a 100644
--- a/src/vnet/devices/tap/tapv2_api.c
+++ b/src/vnet/devices/tap/tapv2_api.c
@@ -232,8 +232,8 @@ vl_api_sw_interface_tap_v2_dump_t_handler (vl_api_sw_interface_tap_v2_dump_t *
return;
filter_sw_if_index = htonl (mp->sw_if_index);
- if (filter_sw_if_index != ~0)
- return; /* UNIMPLEMENTED */
+ if (mp->sw_if_index != ~0)
+ VALIDATE_SW_IF_INDEX (mp);
rv = tap_dump_ifs (&tapifs);
if (rv)
@@ -241,9 +241,11 @@ vl_api_sw_interface_tap_v2_dump_t_handler (vl_api_sw_interface_tap_v2_dump_t *
vec_foreach (tap_if, tapifs)
{
- tap_send_sw_interface_details (am, reg, tap_if, mp->context);
+ if ((filter_sw_if_index == ~0)
+ || (tap_if->sw_if_index == filter_sw_if_index))
+ tap_send_sw_interface_details (am, reg, tap_if, mp->context);
}
-
+ BAD_SW_IF_INDEX_LABEL;
vec_free (tapifs);
}