summaryrefslogtreecommitdiffstats
path: root/src/plugins/nat/nat64_in2out.c
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/nat/nat64_in2out.c
parentb9a4c445c1d4e9cdab476a8e1fb8a46ff0fc6080 (diff)
c11 safe string handling support
Change-Id: Ied34720ca5a6e6e717eea4e86003e854031b6eab Signed-off-by: Dave Barach <dave@barachs.net>
Diffstat (limited to 'src/plugins/nat/nat64_in2out.c')
-rw-r--r--src/plugins/nat/nat64_in2out.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/plugins/nat/nat64_in2out.c b/src/plugins/nat/nat64_in2out.c
index dc5cc005fd7..d19aab87983 100644
--- a/src/plugins/nat/nat64_in2out.c
+++ b/src/plugins/nat/nat64_in2out.c
@@ -445,9 +445,9 @@ unk_proto_st_walk (nat64_db_st_entry_t * ste, void *arg)
if (ip46_address_is_equal (&bibe->in_addr, &ctx->src_addr)
&& bibe->fib_index == ctx->fib_index)
{
- memset (&saddr, 0, sizeof (saddr));
+ clib_memset (&saddr, 0, sizeof (saddr));
saddr.ip4.as_u32 = bibe->out_addr.as_u32;
- memset (&daddr, 0, sizeof (daddr));
+ clib_memset (&daddr, 0, sizeof (daddr));
nat64_extract_ip4 (&ctx->dst_addr, &daddr.ip4, ctx->fib_index);
if (nat64_db_st_entry_find
@@ -518,7 +518,7 @@ nat64_in2out_unk_proto_set_cb (ip6_header_t * ip6, ip4_header_t * ip4,
nat64_db_st_walk (db, IP_PROTOCOL_UDP, unk_proto_st_walk, &ctx);
/* Verify if out address is not already in use for protocol */
- memset (&addr, 0, sizeof (addr));
+ clib_memset (&addr, 0, sizeof (addr));
addr.ip4.as_u32 = ctx.out_addr.as_u32;
if (nat64_db_bib_entry_find (db, &addr, 0, proto, 0, 0))
ctx.out_addr.as_u32 = 0;
@@ -646,7 +646,7 @@ nat64_in2out_tcp_udp_hairpinning (vlib_main_t * vm, vlib_buffer_t * b,
sport = udp->src_port = bibe->out_port;
nat64_compose_ip6 (&ip6->src_address, &bibe->out_addr, fib_index);
- memset (&daddr, 0, sizeof (daddr));
+ clib_memset (&daddr, 0, sizeof (daddr));
daddr.ip4.as_u32 = ste->out_r_addr.as_u32;
bibe = 0;
@@ -746,8 +746,8 @@ nat64_in2out_icmp_hairpinning (vlib_main_t * vm, vlib_buffer_t * b,
dport = udp->dst_port = bibe->out_port;
nat64_compose_ip6 (&inner_ip6->dst_address, &bibe->out_addr, fib_index);
- memset (&saddr, 0, sizeof (saddr));
- memset (&daddr, 0, sizeof (daddr));
+ clib_memset (&saddr, 0, sizeof (saddr));
+ clib_memset (&daddr, 0, sizeof (daddr));
saddr.ip4.as_u32 = ste->out_r_addr.as_u32;
daddr.ip4.as_u32 = bibe->out_addr.as_u32;
@@ -859,7 +859,7 @@ nat64_in2out_unk_proto_hairpinning (vlib_main_t * vm, vlib_buffer_t * b,
nat64_db_st_walk (db, IP_PROTOCOL_UDP, unk_proto_st_walk, &ctx);
/* Verify if out address is not already in use for protocol */
- memset (&addr, 0, sizeof (addr));
+ clib_memset (&addr, 0, sizeof (addr));
addr.ip4.as_u32 = ctx.out_addr.as_u32;
if (nat64_db_bib_entry_find (db, &addr, 0, proto, 0, 0))
ctx.out_addr.as_u32 = 0;
@@ -896,7 +896,7 @@ nat64_in2out_unk_proto_hairpinning (vlib_main_t * vm, vlib_buffer_t * b,
nat64_compose_ip6 (&ip6->src_address, &bibe->out_addr, fib_index);
- memset (&daddr, 0, sizeof (daddr));
+ clib_memset (&daddr, 0, sizeof (daddr));
daddr.ip4.as_u32 = ste->out_r_addr.as_u32;
bibe = 0;
@@ -1279,7 +1279,7 @@ nat64_in2out_frag_hairpinning (vlib_buffer_t * b, ip6_header_t * ip6,
nat64_compose_ip6 (&ip6->src_address, &bibe->out_addr, bibe->fib_index);
- memset (&daddr, 0, sizeof (daddr));
+ clib_memset (&daddr, 0, sizeof (daddr));
daddr.ip4.as_u32 = ste->out_r_addr.as_u32;
bibe = 0;