summaryrefslogtreecommitdiffstats
path: root/test/ext/vapi_c_test.c
diff options
context:
space:
mode:
authorKlement Sekera <ksekera@cisco.com>2020-06-09 14:17:45 +0000
committerDave Barach <openvpp@barachs.net>2020-06-10 11:11:07 +0000
commit35418ba491505318e0b08b372fcf1e9f0d45d80f (patch)
tree70a2abad4266eb2afb1f4bc112b43316c4f3389a /test/ext/vapi_c_test.c
parentce53363d2018071df00ffddf2ffa13c4229139a8 (diff)
vapi: memset allocated messages to zero
This avoids using dirty data from shared memory by client. Type: fix Signed-off-by: Klement Sekera <ksekera@cisco.com> Change-Id: I96eecf655bf344ec29609cedbd8dc891b572e207
Diffstat (limited to 'test/ext/vapi_c_test.c')
-rw-r--r--test/ext/vapi_c_test.c12
1 files changed, 0 insertions, 12 deletions
diff --git a/test/ext/vapi_c_test.c b/test/ext/vapi_c_test.c
index b5075e96c10..0247933f605 100644
--- a/test/ext/vapi_c_test.c
+++ b/test/ext/vapi_c_test.c
@@ -526,9 +526,6 @@ START_TEST (test_loopbacks_1)
dctx.last_called = false;
clib_memset (&seen, 0, sizeof (seen));
dump = vapi_alloc_sw_interface_dump (ctx);
- dump->payload.name_filter_valid = 0;
- clib_memset (dump->payload.name_filter.buf, 0,
- dump->payload.name_filter.length);
while (VAPI_EAGAIN ==
(rv =
vapi_sw_interface_dump (ctx, dump, sw_interface_dump_cb,
@@ -558,9 +555,6 @@ START_TEST (test_loopbacks_1)
dctx.last_called = false;
clib_memset (&seen, 0, sizeof (seen));
dump = vapi_alloc_sw_interface_dump (ctx);
- dump->payload.name_filter_valid = 0;
- clib_memset (dump->payload.name_filter.buf, 0,
- dump->payload.name_filter.length);
while (VAPI_EAGAIN ==
(rv =
vapi_sw_interface_dump (ctx, dump, sw_interface_dump_cb, &dctx)))
@@ -683,9 +677,6 @@ START_TEST (test_loopbacks_2)
clib_memset (&seen, 0, sizeof (seen));
sw_interface_dump_ctx dctx = { false, num_ifs, sw_if_indexes, seen, 0 };
vapi_msg_sw_interface_dump *dump = vapi_alloc_sw_interface_dump (ctx);
- dump->payload.name_filter_valid = 0;
- clib_memset (dump->payload.name_filter.buf, 0,
- dump->payload.name_filter.length);
while (VAPI_EAGAIN ==
(rv =
vapi_sw_interface_dump (ctx, dump, sw_interface_dump_cb, &dctx)))
@@ -724,9 +715,6 @@ START_TEST (test_loopbacks_2)
clib_memset (&seen, 0, sizeof (seen));
dctx.last_called = false;
dump = vapi_alloc_sw_interface_dump (ctx);
- dump->payload.name_filter_valid = 0;
- clib_memset (dump->payload.name_filter.buf, 0,
- dump->payload.name_filter.length);
while (VAPI_EAGAIN ==
(rv =
vapi_sw_interface_dump (ctx, dump, sw_interface_dump_cb, &dctx)))