diff options
author | Aequitas <wang.junqi@zte.com.cn> | 2017-09-23 12:58:49 +0800 |
---|---|---|
committer | Florin Coras <florin.coras@gmail.com> | 2017-09-26 05:22:28 +0000 |
commit | fc4510bbdb85c5bd6ff4fc69996e78d568254091 (patch) | |
tree | 2f2ab2899bb9ab5136a8358fba77166d6ed36e05 /src/plugins/nat/nat64_cli.c | |
parent | f91fe3b060d58713d24e302abaf950556c26601e (diff) |
Memory overwritten when using unformat %u (VPP-987)
Change-Id: I7d8f807fb502d61688aa1dee25fa4edcbeb32f41
Signed-off-by: Aequitas <wang.junqi@zte.com.cn>
Diffstat (limited to 'src/plugins/nat/nat64_cli.c')
-rw-r--r-- | src/plugins/nat/nat64_cli.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/plugins/nat/nat64_cli.c b/src/plugins/nat/nat64_cli.c index 8890038700a..f3645bbbe0b 100644 --- a/src/plugins/nat/nat64_cli.c +++ b/src/plugins/nat/nat64_cli.c @@ -301,8 +301,8 @@ nat64_add_del_static_bib_command_fn (vlib_main_t * u8 is_add = 1; ip6_address_t in_addr; ip4_address_t out_addr; - u16 in_port = 0; - u16 out_port = 0; + u32 in_port = 0; + u32 out_port = 0; u32 vrf_id = 0, protocol; snat_protocol_t proto = 0; u8 p = 0; @@ -362,8 +362,8 @@ nat64_add_del_static_bib_command_fn (vlib_main_t * } rv = - nat64_add_del_static_bib_entry (&in_addr, &out_addr, in_port, out_port, p, - vrf_id, is_add); + nat64_add_del_static_bib_entry (&in_addr, &out_addr, (u16) in_port, + (u16) out_port, p, vrf_id, is_add); switch (rv) { |