summaryrefslogtreecommitdiffstats
path: root/src/vnet/fib
diff options
context:
space:
mode:
authorDave Barach <dave@barachs.net>2018-10-17 10:38:51 -0400
committerDamjan Marion <dmarion@me.com>2018-10-23 13:06:46 +0000
commitb7b929931a07fbb27b43d5cd105f366c3e29807e (patch)
tree438681c89738802dbb5d339715b96ea2c31bafb4 /src/vnet/fib
parentb9a4c445c1d4e9cdab476a8e1fb8a46ff0fc6080 (diff)
c11 safe string handling support
Change-Id: Ied34720ca5a6e6e717eea4e86003e854031b6eab Signed-off-by: Dave Barach <dave@barachs.net>
Diffstat (limited to 'src/vnet/fib')
-rw-r--r--src/vnet/fib/fib_api.c4
-rw-r--r--src/vnet/fib/fib_attached_export.c2
-rw-r--r--src/vnet/fib/fib_entry.c2
-rw-r--r--src/vnet/fib/fib_path.c6
-rw-r--r--src/vnet/fib/fib_path_list.c2
-rw-r--r--src/vnet/fib/fib_types.c2
-rw-r--r--src/vnet/fib/fib_urpf_list.c2
-rw-r--r--src/vnet/fib/fib_walk.c10
-rw-r--r--src/vnet/fib/ip4_fib.c2
-rw-r--r--src/vnet/fib/ip6_fib.c6
-rw-r--r--src/vnet/fib/mpls_fib.c2
11 files changed, 20 insertions, 20 deletions
diff --git a/src/vnet/fib/fib_api.c b/src/vnet/fib/fib_api.c
index 3c832eb01fb..d46b9e23b04 100644
--- a/src/vnet/fib/fib_api.c
+++ b/src/vnet/fib/fib_api.c
@@ -49,7 +49,7 @@ fib_path_api_parse (const vl_api_fib_path_t *in,
path_flags = FIB_ROUTE_PATH_FLAG_NONE;
next_hop_via_label = ntohl (in->via_label);
- memset(out, 0, sizeof(*out));
+ clib_memset(out, 0, sizeof(*out));
out->frp_sw_if_index = ~0;
out->frp_proto = in->afi;
@@ -207,7 +207,7 @@ void
fib_api_path_encode (const fib_route_path_encode_t * api_rpath,
vl_api_fib_path_t *out)
{
- memset (out, 0, sizeof (*out));
+ clib_memset (out, 0, sizeof (*out));
switch (api_rpath->dpo.dpoi_type)
{
case DPO_RECEIVE:
diff --git a/src/vnet/fib/fib_attached_export.c b/src/vnet/fib/fib_attached_export.c
index e522db44570..feb304bea36 100644
--- a/src/vnet/fib/fib_attached_export.c
+++ b/src/vnet/fib/fib_attached_export.c
@@ -107,7 +107,7 @@ fib_entry_ae_add_or_lock (fib_node_index_t connected)
fed = fib_entry_delegate_find_or_add(entry,
FIB_ENTRY_DELEGATE_ATTACHED_EXPORT);
pool_get(fib_ae_export_pool, export);
- memset(export, 0, sizeof(*export));
+ clib_memset(export, 0, sizeof(*export));
fed->fd_index = (export - fib_ae_export_pool);
export->faee_ei = connected;
diff --git a/src/vnet/fib/fib_entry.c b/src/vnet/fib/fib_entry.c
index 7de521336b8..eaedc504d48 100644
--- a/src/vnet/fib/fib_entry.c
+++ b/src/vnet/fib/fib_entry.c
@@ -601,7 +601,7 @@ fib_entry_alloc (u32 fib_index,
fib_prefix_t *fep;
pool_get(fib_entry_pool, fib_entry);
- memset(fib_entry, 0, sizeof(*fib_entry));
+ clib_memset(fib_entry, 0, sizeof(*fib_entry));
fib_node_init(&fib_entry->fe_node,
FIB_NODE_TYPE_ENTRY);
diff --git a/src/vnet/fib/fib_path.c b/src/vnet/fib/fib_path.c
index e37d47482db..baf8275d181 100644
--- a/src/vnet/fib/fib_path.c
+++ b/src/vnet/fib/fib_path.c
@@ -1256,7 +1256,7 @@ fib_path_create (fib_node_index_t pl_index,
fib_path_t *path;
pool_get(fib_path_pool, path);
- memset(path, 0, sizeof(*path));
+ clib_memset(path, 0, sizeof(*path));
fib_node_init(&path->fp_node,
FIB_NODE_TYPE_PATH);
@@ -1397,7 +1397,7 @@ fib_path_create_special (fib_node_index_t pl_index,
fib_path_t *path;
pool_get(fib_path_pool, path);
- memset(path, 0, sizeof(*path));
+ clib_memset(path, 0, sizeof(*path));
fib_node_init(&path->fp_node,
FIB_NODE_TYPE_PATH);
@@ -1456,7 +1456,7 @@ fib_path_copy (fib_node_index_t path_index,
path->fp_oper_flags = FIB_PATH_OPER_FLAG_NONE;
path->fp_pl_index = path_list_index;
path->fp_via_fib = FIB_NODE_INDEX_INVALID;
- memset(&path->fp_dpo, 0, sizeof(path->fp_dpo));
+ clib_memset(&path->fp_dpo, 0, sizeof(path->fp_dpo));
dpo_reset(&path->fp_dpo);
return (fib_path_get_index(path));
diff --git a/src/vnet/fib/fib_path_list.c b/src/vnet/fib/fib_path_list.c
index 4655c687427..568886af143 100644
--- a/src/vnet/fib/fib_path_list.c
+++ b/src/vnet/fib/fib_path_list.c
@@ -542,7 +542,7 @@ fib_path_list_alloc (fib_node_index_t *path_list_index)
fib_path_list_t *path_list;
pool_get(fib_path_list_pool, path_list);
- memset(path_list, 0, sizeof(*path_list));
+ clib_memset(path_list, 0, sizeof(*path_list));
fib_node_init(&path_list->fpl_node,
FIB_NODE_TYPE_PATH_LIST);
diff --git a/src/vnet/fib/fib_types.c b/src/vnet/fib/fib_types.c
index 25606438491..7f0f13079ee 100644
--- a/src/vnet/fib/fib_types.c
+++ b/src/vnet/fib/fib_types.c
@@ -440,7 +440,7 @@ unformat_fib_route_path (unformat_input_t * input, va_list * args)
vnet_main_t *vnm;
vnm = vnet_get_main ();
- memset(rpath, 0, sizeof(*rpath));
+ clib_memset(rpath, 0, sizeof(*rpath));
rpath->frp_weight = 1;
rpath->frp_sw_if_index = ~0;
diff --git a/src/vnet/fib/fib_urpf_list.c b/src/vnet/fib/fib_urpf_list.c
index d5a406e6191..a895729e91a 100644
--- a/src/vnet/fib/fib_urpf_list.c
+++ b/src/vnet/fib/fib_urpf_list.c
@@ -57,7 +57,7 @@ fib_urpf_list_alloc_and_lock (void)
fib_urpf_list_t *urpf;
pool_get(fib_urpf_list_pool, urpf);
- memset(urpf, 0, sizeof(*urpf));
+ clib_memset(urpf, 0, sizeof(*urpf));
urpf->furpf_locks++;
diff --git a/src/vnet/fib/fib_walk.c b/src/vnet/fib/fib_walk.c
index 6a64d554f98..64c2527b7b6 100644
--- a/src/vnet/fib/fib_walk.c
+++ b/src/vnet/fib/fib_walk.c
@@ -1181,11 +1181,11 @@ fib_walk_clear (vlib_main_t * vm,
unformat_input_t * input,
vlib_cli_command_t * cmd)
{
- memset(fib_walk_hist_vists_per_walk, 0, sizeof(fib_walk_hist_vists_per_walk));
- memset(fib_walk_history, 0, sizeof(fib_walk_history));
- memset(fib_walk_work_time_taken, 0, sizeof(fib_walk_work_time_taken));
- memset(fib_walk_work_nodes_visited, 0, sizeof(fib_walk_work_nodes_visited));
- memset(fib_walk_sleep_lengths, 0, sizeof(fib_walk_sleep_lengths));
+ clib_memset(fib_walk_hist_vists_per_walk, 0, sizeof(fib_walk_hist_vists_per_walk));
+ clib_memset(fib_walk_history, 0, sizeof(fib_walk_history));
+ clib_memset(fib_walk_work_time_taken, 0, sizeof(fib_walk_work_time_taken));
+ clib_memset(fib_walk_work_nodes_visited, 0, sizeof(fib_walk_work_nodes_visited));
+ clib_memset(fib_walk_sleep_lengths, 0, sizeof(fib_walk_sleep_lengths));
return (NULL);
}
diff --git a/src/vnet/fib/ip4_fib.c b/src/vnet/fib/ip4_fib.c
index d8d983dd9c1..9ad1842dd1a 100644
--- a/src/vnet/fib/ip4_fib.c
+++ b/src/vnet/fib/ip4_fib.c
@@ -109,7 +109,7 @@ ip4_create_fib_with_table_id (u32 table_id,
void *old_heap;
pool_get(ip4_main.fibs, fib_table);
- memset(fib_table, 0, sizeof(*fib_table));
+ clib_memset(fib_table, 0, sizeof(*fib_table));
old_heap = clib_mem_set_heap (ip4_main.mtrie_mheap);
pool_get_aligned(ip4_main.v4_fibs, v4_fib, CLIB_CACHE_LINE_BYTES);
diff --git a/src/vnet/fib/ip6_fib.c b/src/vnet/fib/ip6_fib.c
index 22b47579d3e..7375b56ee51 100644
--- a/src/vnet/fib/ip6_fib.c
+++ b/src/vnet/fib/ip6_fib.c
@@ -63,8 +63,8 @@ create_fib_with_table_id (u32 table_id,
pool_get(ip6_main.fibs, fib_table);
pool_get_aligned(ip6_main.v6_fibs, v6_fib, CLIB_CACHE_LINE_BYTES);
- memset(fib_table, 0, sizeof(*fib_table));
- memset(v6_fib, 0, sizeof(*v6_fib));
+ clib_memset(fib_table, 0, sizeof(*fib_table));
+ clib_memset(v6_fib, 0, sizeof(*v6_fib));
ASSERT((fib_table - ip6_main.fibs) ==
(v6_fib - ip6_main.v6_fibs));
@@ -690,7 +690,7 @@ ip6_show_fib (vlib_main_t * vm,
vlib_cli_output (vm, "%=20s%=16s", "Prefix length", "Count");
- memset (ca, 0, sizeof(*ca));
+ clib_memset (ca, 0, sizeof(*ca));
ca->fib_index = fib->index;
BV(clib_bihash_foreach_key_value_pair)
diff --git a/src/vnet/fib/mpls_fib.c b/src/vnet/fib/mpls_fib.c
index 223a0ddd753..6670c99233f 100644
--- a/src/vnet/fib/mpls_fib.c
+++ b/src/vnet/fib/mpls_fib.c
@@ -98,7 +98,7 @@ mpls_fib_create_with_table_id (u32 table_id,
ASSERT((fib_table - mpls_main.fibs) ==
(mf - mpls_main.mpls_fibs));
- memset(fib_table, 0, sizeof(*fib_table));
+ clib_memset(fib_table, 0, sizeof(*fib_table));
fib_table->ft_proto = FIB_PROTOCOL_MPLS;
fib_table->ft_index = (fib_table - mpls_main.fibs);