aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/nat
diff options
context:
space:
mode:
authorWei Li <realbaseball2008@gmail.com>2023-03-08 11:36:55 +0000
committerOle Tr�an <otroan@employees.org>2023-08-26 13:46:26 +0000
commitd7c94ce18e893229a6de50ac15e14009558170ad (patch)
treeface8edddc57661905b5d3b57f70004cde661fbf /src/plugins/nat
parent942e78aa9848a55b3b6e53cd29a972c136115b56 (diff)
nat: nat44-ed bug fix
fix lb static mapping "nat44_ed_sm_o2i_add" laddr and lport Type: fix Signed-off-by: Wei Li <realbaseball2008@gmail.com> Change-Id: I249a00919e8154d92cbce03f6db196c13612948f
Diffstat (limited to 'src/plugins/nat')
-rw-r--r--src/plugins/nat/nat44-ed/nat44_ed.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/plugins/nat/nat44-ed/nat44_ed.c b/src/plugins/nat/nat44-ed/nat44_ed.c
index 74359ccf8ee..5eee893f2fd 100644
--- a/src/plugins/nat/nat44-ed/nat44_ed.c
+++ b/src/plugins/nat/nat44-ed/nat44_ed.c
@@ -1352,9 +1352,10 @@ nat44_ed_add_lb_static_mapping (ip4_address_t e_addr, u16 e_port,
FIB_PROTOCOL_IP4, locals[i].vrf_id, sm->fib_src_low);
if (!is_sm_out2in_only (flags))
{
- if (nat44_ed_sm_o2i_add (sm, m, e_addr, e_port, 0, proto))
+ if (nat44_ed_sm_i2o_add (sm, m, locals[i].addr, locals[i].port, 0,
+ proto))
{
- nat_log_err ("sm o2i key add failed");
+ nat_log_err ("sm i2o key add failed");
rc = VNET_API_ERROR_UNSPECIFIED;
// here we continue with add operation so that it can be safely
// reversed in delete path - otherwise we'd have to track what
@@ -1430,7 +1431,7 @@ nat44_ed_del_lb_static_mapping (ip4_address_t e_addr, u16 e_port,
local->fib_index, m->proto))
{
nat_log_err ("sm i2o key del failed");
- return VNET_API_ERROR_UNSPECIFIED;
+ // For the same reasons as above
}
}