aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/igmp
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/plugins/igmp
parentb9a4c445c1d4e9cdab476a8e1fb8a46ff0fc6080 (diff)
c11 safe string handling support
Change-Id: Ied34720ca5a6e6e717eea4e86003e854031b6eab Signed-off-by: Dave Barach <dave@barachs.net>
Diffstat (limited to 'src/plugins/igmp')
-rw-r--r--src/plugins/igmp/igmp.c2
-rw-r--r--src/plugins/igmp/igmp_api.c10
-rw-r--r--src/plugins/igmp/igmp_group.c2
-rw-r--r--src/plugins/igmp/igmp_pkt.c6
-rw-r--r--src/plugins/igmp/igmp_proxy.c2
-rw-r--r--src/plugins/igmp/igmp_src.c2
6 files changed, 12 insertions, 12 deletions
diff --git a/src/plugins/igmp/igmp.c b/src/plugins/igmp/igmp.c
index 61a9970af14..e12a6323b40 100644
--- a/src/plugins/igmp/igmp.c
+++ b/src/plugins/igmp/igmp.c
@@ -375,7 +375,7 @@ igmp_enable_disable (u32 sw_if_index, u8 enable, igmp_mode_t mode)
vec_validate_init_empty (im->igmp_config_by_sw_if_index,
sw_if_index, ~0);
pool_get (im->configs, config);
- memset (config, 0, sizeof (igmp_config_t));
+ clib_memset (config, 0, sizeof (igmp_config_t));
config->sw_if_index = sw_if_index;
config->igmp_group_by_key =
hash_create_mem (0, sizeof (igmp_key_t), sizeof (uword));
diff --git a/src/plugins/igmp/igmp_api.c b/src/plugins/igmp/igmp_api.c
index 5d836967b4b..75a2daedd62 100644
--- a/src/plugins/igmp/igmp_api.c
+++ b/src/plugins/igmp/igmp_api.c
@@ -81,7 +81,7 @@ vl_api_igmp_listen_t_handler (vl_api_igmp_listen_t * mp)
goto done;
}
- memset (&gaddr, 0, sizeof (gaddr));
+ clib_memset (&gaddr, 0, sizeof (gaddr));
clib_memcpy (&gaddr.ip4, &mp->group.gaddr, sizeof (ip4_address_t));
vec_validate (saddrs, mp->group.n_srcs - 1);
@@ -167,7 +167,7 @@ send_igmp_details (unix_shared_memory_queue_t * q, igmp_main_t * im,
vl_api_igmp_details_t *mp;
mp = vl_msg_api_alloc (sizeof (*mp));
- memset (mp, 0, sizeof (*mp));
+ clib_memset (mp, 0, sizeof (*mp));
mp->_vl_msg_id = htons (IGMP_MSG_ID (VL_API_IGMP_DETAILS));
mp->context = context;
@@ -298,7 +298,7 @@ igmp_ssm_range_walk_dump (const fib_prefix_t * pfx,
vl_api_igmp_group_prefix_details_t *mp;
mp = vl_msg_api_alloc (sizeof (*mp));
- memset (mp, 0, sizeof (*mp));
+ clib_memset (mp, 0, sizeof (*mp));
mp->_vl_msg_id = htons (IGMP_MSG_ID (VL_API_IGMP_DETAILS));
mp->context = ctx->context;
@@ -364,7 +364,7 @@ vl_api_want_igmp_events_t_handler (vl_api_want_igmp_events_t * mp)
if (mp->enable)
{
pool_get (im->api_clients, api_client);
- memset (api_client, 0, sizeof (vpe_client_registration_t));
+ clib_memset (api_client, 0, sizeof (vpe_client_registration_t));
api_client->client_index = mp->client_index;
api_client->client_pid = mp->pid;
hash_set (im->igmp_api_client_by_client_index,
@@ -405,7 +405,7 @@ send_igmp_event (unix_shared_memory_queue_t * q,
const ip46_address_t * saddr, const ip46_address_t * gaddr)
{
vl_api_igmp_event_t *mp = vl_msg_api_alloc (sizeof (*mp));
- memset (mp, 0, sizeof (*mp));
+ clib_memset (mp, 0, sizeof (*mp));
mp->_vl_msg_id = ntohs ((VL_API_IGMP_EVENT) + igmp_main.msg_id_base);
mp->context = context;
diff --git a/src/plugins/igmp/igmp_group.c b/src/plugins/igmp/igmp_group.c
index 9f50ad9b05a..38499e4778f 100644
--- a/src/plugins/igmp/igmp_group.c
+++ b/src/plugins/igmp/igmp_group.c
@@ -109,7 +109,7 @@ igmp_group_alloc (igmp_config_t * config,
IGMP_DBG ("new-group: %U", format_igmp_key, gkey);
pool_get (im->groups, group);
- memset (group, 0, sizeof (igmp_group_t));
+ clib_memset (group, 0, sizeof (igmp_group_t));
group->key = clib_mem_alloc (sizeof (igmp_key_t));
clib_memcpy (group->key, gkey, sizeof (igmp_key_t));
group->igmp_src_by_key[IGMP_FILTER_MODE_INCLUDE] =
diff --git a/src/plugins/igmp/igmp_pkt.c b/src/plugins/igmp/igmp_pkt.c
index a2034d4bec6..c2a5d0911c6 100644
--- a/src/plugins/igmp/igmp_pkt.c
+++ b/src/plugins/igmp/igmp_pkt.c
@@ -73,7 +73,7 @@ igmp_pkt_build_ip_header (igmp_pkt_build_t * bk,
return (NULL);
ip4 = vlib_buffer_get_current (b);
- memset (ip4, 0, sizeof (ip4_header_t));
+ clib_memset (ip4, 0, sizeof (ip4_header_t));
ip4->ip_version_and_header_length = 0x46;
ip4->ttl = 1;
ip4->protocol = IP_PROTOCOL_IGMP;
@@ -402,7 +402,7 @@ igmp_pkt_report_v3_add_group (igmp_pkt_build_report_t * br,
void
igmp_pkt_build_report_init (igmp_pkt_build_report_t * br, u32 sw_if_index)
{
- memset (br, 0, sizeof (*br));
+ clib_memset (br, 0, sizeof (*br));
br->base.sw_if_index = sw_if_index;
}
@@ -525,7 +525,7 @@ igmp_pkt_query_v3_send (igmp_pkt_build_query_t * bq)
void
igmp_pkt_build_query_init (igmp_pkt_build_query_t * bq, u32 sw_if_index)
{
- memset (bq, 0, sizeof (*bq));
+ clib_memset (bq, 0, sizeof (*bq));
bq->base.sw_if_index = sw_if_index;
}
diff --git a/src/plugins/igmp/igmp_proxy.c b/src/plugins/igmp/igmp_proxy.c
index 4a439d650c9..690b38a8001 100644
--- a/src/plugins/igmp/igmp_proxy.c
+++ b/src/plugins/igmp/igmp_proxy.c
@@ -106,7 +106,7 @@ igmp_proxy_device_add_del (u32 vrf_id, u32 sw_if_index, u8 add)
pool_get (im->proxy_devices, proxy_device);
im->igmp_proxy_device_by_vrf_id[vrf_id] =
proxy_device - im->proxy_devices;
- memset (proxy_device, 0, sizeof (igmp_proxy_device_t));
+ clib_memset (proxy_device, 0, sizeof (igmp_proxy_device_t));
proxy_device->vrf_id = vrf_id;
proxy_device->upstream_if = sw_if_index;
config->proxy_device_id = vrf_id;
diff --git a/src/plugins/igmp/igmp_src.c b/src/plugins/igmp/igmp_src.c
index 0bdde83214c..cc7de6c1921 100644
--- a/src/plugins/igmp/igmp_src.c
+++ b/src/plugins/igmp/igmp_src.c
@@ -78,7 +78,7 @@ igmp_src_alloc (u32 group_index, const igmp_key_t * skey, igmp_mode_t mode)
IGMP_DBG ("new-src: (%U)", format_igmp_key, skey);
pool_get (im->srcs, src);
- memset (src, 0, sizeof (igmp_src_t));
+ clib_memset (src, 0, sizeof (igmp_src_t));
src->mode = mode;
src->key = clib_mem_alloc (sizeof (*skey));
src->group = group_index;