diff options
author | Dave Barach <dave@barachs.net> | 2018-10-17 10:38:51 -0400 |
---|---|---|
committer | Damjan Marion <dmarion@me.com> | 2018-10-23 13:06:46 +0000 |
commit | b7b929931a07fbb27b43d5cd105f366c3e29807e (patch) | |
tree | 438681c89738802dbb5d339715b96ea2c31bafb4 /src/vnet/srv6/sr_api.c | |
parent | b9a4c445c1d4e9cdab476a8e1fb8a46ff0fc6080 (diff) |
c11 safe string handling support
Change-Id: Ied34720ca5a6e6e717eea4e86003e854031b6eab
Signed-off-by: Dave Barach <dave@barachs.net>
Diffstat (limited to 'src/vnet/srv6/sr_api.c')
-rw-r--r-- | src/vnet/srv6/sr_api.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/src/vnet/srv6/sr_api.c b/src/vnet/srv6/sr_api.c index c37923f7b01..46fb8293c64 100644 --- a/src/vnet/srv6/sr_api.c +++ b/src/vnet/srv6/sr_api.c @@ -71,7 +71,7 @@ static void vl_api_sr_localsid_add_del_t_handler ip46_address_t prefix; - memset (&prefix, 0, sizeof (ip46_address_t)); + clib_memset (&prefix, 0, sizeof (ip46_address_t)); if ((mp->nh_addr4[0] | mp->nh_addr4[1] | mp-> nh_addr4[2] | mp->nh_addr4[3]) != 0) memcpy (&prefix.ip4, mp->nh_addr4, sizeof (prefix.ip4)); @@ -210,7 +210,7 @@ static void send_sr_localsid_details vl_api_sr_localsids_details_t *rmp; rmp = vl_msg_api_alloc (sizeof (*rmp)); - memset (rmp, 0, sizeof (*rmp)); + clib_memset (rmp, 0, sizeof (*rmp)); rmp->_vl_msg_id = ntohs (VL_API_SR_LOCALSIDS_DETAILS); clib_memcpy (rmp->addr.addr, &t->localsid, sizeof (ip6_address_t)); rmp->end_psp = t->end_psp; @@ -261,9 +261,10 @@ static void send_sr_policies_details rmp = vl_msg_api_alloc (sizeof (*rmp) + vec_len (t->segments_lists) * sizeof (vl_api_srv6_sid_list_t)); - memset (rmp, 0, - (sizeof (*rmp) + - vec_len (t->segments_lists) * sizeof (vl_api_srv6_sid_list_t))); + clib_memset (rmp, 0, + (sizeof (*rmp) + + vec_len (t->segments_lists) * + sizeof (vl_api_srv6_sid_list_t))); rmp->_vl_msg_id = ntohs (VL_API_SR_POLICIES_DETAILS); clib_memcpy (rmp->bsid.addr, &t->bsid, sizeof (ip6_address_t)); @@ -313,7 +314,7 @@ static void send_sr_steering_pol_details ip6_sr_main_t *sm = &sr_main; rmp = vl_msg_api_alloc (sizeof (*rmp)); - memset (rmp, 0, sizeof (*rmp)); + clib_memset (rmp, 0, sizeof (*rmp)); rmp->_vl_msg_id = ntohs (VL_API_SR_STEERING_POL_DETAILS); //Get the SR policy BSID |