From 64b6dd7f8f120251e10ee84ff491beb6bae36e82 Mon Sep 17 00:00:00 2001 From: Aleksander Djuric Date: Thu, 31 Oct 2019 14:35:21 +0300 Subject: interface: shmemioerror while getting name_filter arg Type: fix Signed-off-by: Aleksander Djuric Change-Id: I5e0eb7024d208040d79e9d6db863f41e2ecf4ee6 Signed-off-by: Ole Troan (cherry picked from commit c12eae73f925169597e20a8f8139c462e317404d) --- src/vnet/interface_api.c | 5 ++--- src/vpp/api/custom_dump.c | 6 +++++- 2 files changed, 7 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/vnet/interface_api.c b/src/vnet/interface_api.c index dd78d2aa8a7..1fe12e8d044 100644 --- a/src/vnet/interface_api.c +++ b/src/vnet/interface_api.c @@ -327,9 +327,8 @@ vl_api_sw_interface_dump_t_handler (vl_api_sw_interface_dump_t * mp) if (mp->name_filter_valid) { - filter = - format (0, ".*%s", vl_api_string_len (&mp->name_filter), - vl_api_from_api_string (&mp->name_filter), 0); + filter = vl_api_from_api_to_vec (&mp->name_filter); + vec_add1 (filter, 0); /* Ensure it's a C string for strcasecmp() */ } char *strcasestr (char *, char *); /* lnx hdr file botch */ diff --git a/src/vpp/api/custom_dump.c b/src/vpp/api/custom_dump.c index 6ad0f9ce9c7..b7e6b6f3e19 100644 --- a/src/vpp/api/custom_dump.c +++ b/src/vpp/api/custom_dump.c @@ -1974,7 +1974,11 @@ static void *vl_api_sw_interface_dump_t_print s = format (0, "SCRIPT: sw_interface_dump "); if (mp->name_filter_valid) - s = format (s, "name_filter %s ", mp->name_filter); + { + u8 *v = vl_api_from_api_to_vec (&mp->name_filter); + s = format (s, "name_filter %v ", v); + vec_free (v); + } else s = format (s, "all "); -- cgit