aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/nat/nat44-ed
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/nat/nat44-ed')
-rw-r--r--src/plugins/nat/nat44-ed/nat44_ed_cli.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/plugins/nat/nat44-ed/nat44_ed_cli.c b/src/plugins/nat/nat44-ed/nat44_ed_cli.c
index 1eac3c323fe..14313d05a35 100644
--- a/src/plugins/nat/nat44-ed/nat44_ed_cli.c
+++ b/src/plugins/nat/nat44-ed/nat44_ed_cli.c
@@ -1058,6 +1058,7 @@ add_lb_static_mapping_command_fn (vlib_main_t * vm,
{
clib_memset (&local, 0, sizeof (local));
local.addr = l_addr;
+ l_port = clib_host_to_net_u16 (l_port);
local.port = (u16) l_port;
local.probability = (u8) probability;
vec_add1 (locals, local);
@@ -1068,6 +1069,7 @@ add_lb_static_mapping_command_fn (vlib_main_t * vm,
{
clib_memset (&local, 0, sizeof (local));
local.addr = l_addr;
+ l_port = clib_host_to_net_u16 (l_port);
local.port = (u16) l_port;
local.probability = (u8) probability;
local.vrf_id = vrf_id;
@@ -1075,7 +1077,9 @@ add_lb_static_mapping_command_fn (vlib_main_t * vm,
}
else if (unformat (line_input, "external %U:%u", unformat_ip4_address,
&e_addr, &e_port))
- ;
+ {
+ e_port = clib_host_to_net_u16 (e_port);
+ }
else if (unformat (line_input, "protocol %U", unformat_ip_protocol,
&proto))
{