summaryrefslogtreecommitdiffstats
path: root/src/vnet/mpls
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/mpls
parentb9a4c445c1d4e9cdab476a8e1fb8a46ff0fc6080 (diff)
c11 safe string handling support
Change-Id: Ied34720ca5a6e6e717eea4e86003e854031b6eab Signed-off-by: Dave Barach <dave@barachs.net>
Diffstat (limited to 'src/vnet/mpls')
-rw-r--r--src/vnet/mpls/mpls.c2
-rw-r--r--src/vnet/mpls/mpls_api.c8
-rw-r--r--src/vnet/mpls/mpls_tunnel.c4
3 files changed, 7 insertions, 7 deletions
diff --git a/src/vnet/mpls/mpls.c b/src/vnet/mpls/mpls.c
index c35aef943cd..05361de505d 100644
--- a/src/vnet/mpls/mpls.c
+++ b/src/vnet/mpls/mpls.c
@@ -228,7 +228,7 @@ vnet_mpls_local_label (vlib_main_t * vm,
eos = MPLS_EOS;
is_del = 0;
local_label = MPLS_LABEL_INVALID;
- memset(&pfx, 0, sizeof(pfx));
+ clib_memset(&pfx, 0, sizeof(pfx));
payload_proto = DPO_PROTO_MPLS;
/* Get a line of input. */
diff --git a/src/vnet/mpls/mpls_api.c b/src/vnet/mpls/mpls_api.c
index 84532bffbda..0f2ebb11bca 100644
--- a/src/vnet/mpls/mpls_api.c
+++ b/src/vnet/mpls/mpls_api.c
@@ -202,7 +202,7 @@ mpls_route_add_del_t_handler (vnet_main_t * vnm,
return (rv);
ip46_address_t nh;
- memset (&nh, 0, sizeof (nh));
+ clib_memset (&nh, 0, sizeof (nh));
if (DPO_PROTO_IP4 == mp->mr_next_hop_proto)
memcpy (&nh.ip4, mp->mr_next_hop, sizeof (nh.ip4));
@@ -316,7 +316,7 @@ vl_api_mpls_tunnel_add_del_t_handler (vl_api_mpls_tunnel_add_del_t * mp)
fib_route_path_t rpath, *rpaths = NULL;
int ii, rv = 0;
- memset (&rpath, 0, sizeof (rpath));
+ clib_memset (&rpath, 0, sizeof (rpath));
stats_dslock_with_hint (1 /* release hint */ , 5 /* tag */ );
@@ -450,7 +450,7 @@ send_mpls_tunnel_entry (u32 mti, void *arg)
n = fib_path_list_get_n_paths (mt->mt_path_list);
mp = vl_msg_api_alloc (sizeof (*mp) + n * sizeof (vl_api_fib_path_t));
- memset (mp, 0, sizeof (*mp) + n * sizeof (vl_api_fib_path_t));
+ clib_memset (mp, 0, sizeof (*mp) + n * sizeof (vl_api_fib_path_t));
mp->_vl_msg_id = ntohs (VL_API_MPLS_TUNNEL_DETAILS);
mp->context = ctx->context;
@@ -504,7 +504,7 @@ send_mpls_fib_details (vpe_api_main_t * am,
mp = vl_msg_api_alloc (sizeof (*mp) + path_count * sizeof (*fp));
if (!mp)
return;
- memset (mp, 0, sizeof (*mp));
+ clib_memset (mp, 0, sizeof (*mp));
mp->_vl_msg_id = ntohs (VL_API_MPLS_FIB_DETAILS);
mp->context = context;
diff --git a/src/vnet/mpls/mpls_tunnel.c b/src/vnet/mpls/mpls_tunnel.c
index f6e5dabdd8f..27c2a2a6f00 100644
--- a/src/vnet/mpls/mpls_tunnel.c
+++ b/src/vnet/mpls/mpls_tunnel.c
@@ -609,7 +609,7 @@ vnet_mpls_tunnel_create (u8 l2_only,
vnm = vnet_get_main();
pool_get(mpls_tunnel_pool, mt);
- memset (mt, 0, sizeof (*mt));
+ clib_memset (mt, 0, sizeof (*mt));
mti = mt - mpls_tunnel_pool;
fib_node_init(&mt->mt_node, FIB_NODE_TYPE_MPLS_TUNNEL);
mt->mt_path_list = FIB_NODE_INDEX_INVALID;
@@ -788,7 +788,7 @@ vnet_create_mpls_tunnel_command_fn (vlib_main_t * vm,
u32 sw_if_index = ~0, payload_proto;
clib_error_t *error = NULL;
- memset(&rpath, 0, sizeof(rpath));
+ clib_memset(&rpath, 0, sizeof(rpath));
payload_proto = DPO_PROTO_MPLS;
/* Get a line of input. */