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/srmpls/sr_mpls_steering.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/srmpls/sr_mpls_steering.c')
-rwxr-xr-x | src/vnet/srmpls/sr_mpls_steering.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/vnet/srmpls/sr_mpls_steering.c b/src/vnet/srmpls/sr_mpls_steering.c index c5ddab73ce4..669644913a3 100755 --- a/src/vnet/srmpls/sr_mpls_steering.c +++ b/src/vnet/srmpls/sr_mpls_steering.c @@ -70,7 +70,7 @@ find_or_create_internal_label (ip46_address_t endpoint, u32 color) if (!color_table) { mhash_t color_t; - memset (&color_t, 0, sizeof (mhash_t)); + clib_memset (&color_t, 0, sizeof (mhash_t)); mhash_init (&color_t, sizeof (u32), sizeof (ip46_address_t)); mhash_set_mem (&sm->sr_policies_c2e2eclabel_hash, &color, (uword *) & color_t, NULL); @@ -391,7 +391,7 @@ sr_mpls_steering_policy_add (mpls_label_t bsid, u32 table_id, mpls_sr_policy_t *sr_policy = 0; uword *p = 0; - memset (&key, 0, sizeof (sr_mpls_steering_key_t)); + clib_memset (&key, 0, sizeof (sr_mpls_steering_key_t)); if (traffic_type != SR_STEER_IPV4 && traffic_type != SR_STEER_IPV6) return -1; @@ -438,7 +438,7 @@ sr_mpls_steering_policy_add (mpls_label_t bsid, u32 table_id, /* Create a new steering policy */ pool_get (sm->steer_policies, steer_pl); - memset (steer_pl, 0, sizeof (*steer_pl)); + clib_memset (steer_pl, 0, sizeof (*steer_pl)); clib_memcpy (&steer_pl->classify.prefix, prefix, sizeof (ip46_address_t)); clib_memcpy (&steer_pl->next_hop, next_hop, sizeof (ip46_address_t)); steer_pl->nh_type = nh_type; @@ -553,7 +553,7 @@ sr_mpls_steering_policy_del (ip46_address_t * prefix, u32 mask_width, fib_prefix_t pfx = { 0 }; uword *p = 0; - memset (&key, 0, sizeof (sr_mpls_steering_key_t)); + clib_memset (&key, 0, sizeof (sr_mpls_steering_key_t)); /* Compute the steer policy key */ if (traffic_type != SR_STEER_IPV4 && traffic_type != SR_STEER_IPV6) @@ -673,8 +673,8 @@ sr_mpls_steer_policy_command_fn (vlib_main_t * vm, unformat_input_t * input, u8 sr_policy_set = 0; - memset (&prefix, 0, sizeof (ip46_address_t)); - memset (&nh, 0, sizeof (ip46_address_t)); + clib_memset (&prefix, 0, sizeof (ip46_address_t)); + clib_memset (&nh, 0, sizeof (ip46_address_t)); int rv; while (unformat_check_input (input) != UNFORMAT_END_OF_INPUT) |