aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/nat/nat44_api.c
diff options
context:
space:
mode:
authorFilip Varga <fivarga@cisco.com>2020-12-21 18:20:00 +0100
committerOle Tr�an <otroan@employees.org>2021-01-11 09:26:28 +0000
commit68d7c546fa7e6c801031f2922c9be067d64e0f59 (patch)
tree91c772be339c023da07cf0ad832370340b096667 /src/plugins/nat/nat44_api.c
parent0bc78d80363efc22d07171473933d1b0016440e4 (diff)
nat: refactor and split fo EI/ED features p.2
Patch n. 2 aimed at moving EI features out of NAT44 plugin & split of EI/ED functions. Type: refactor Change-Id: Ida20c1c084449b146344b6c3d8442f49efb6f3fa Signed-off-by: Filip Varga <fivarga@cisco.com>
Diffstat (limited to 'src/plugins/nat/nat44_api.c')
-rw-r--r--src/plugins/nat/nat44_api.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/src/plugins/nat/nat44_api.c b/src/plugins/nat/nat44_api.c
index cfe2211acd3..c025db74f2e 100644
--- a/src/plugins/nat/nat44_api.c
+++ b/src/plugins/nat/nat44_api.c
@@ -828,13 +828,10 @@ static void
tag = format (0, "%s", mp->tag);
vec_terminate_c_string (tag);
- rv = snat_add_static_mapping (local_addr, external_addr, local_port,
- external_port, vrf_id,
- mp->flags & NAT_API_IS_ADDR_ONLY,
- external_sw_if_index, proto,
- mp->is_add, twice_nat,
- mp->flags & NAT_API_IS_OUT2IN_ONLY, tag, 0,
- pool_addr, 0);
+ rv = snat_add_static_mapping (
+ local_addr, external_addr, local_port, external_port, vrf_id,
+ mp->flags & NAT_API_IS_ADDR_ONLY, external_sw_if_index, proto, mp->is_add,
+ twice_nat, mp->flags & NAT_API_IS_OUT2IN_ONLY, tag, 0, pool_addr, 0);
vec_free (tag);
REPLY_MACRO (VL_API_NAT44_ADD_DEL_STATIC_MAPPING_REPLY);
@@ -1622,7 +1619,7 @@ vl_api_nat44_del_session_t_handler (vl_api_nat44_del_session_t * mp)
nat44_del_ed_session (sm, &addr, port, &eh_addr, eh_port, mp->protocol,
vrf_id, is_in);
else
- rv = nat44_del_session (sm, &addr, port, proto, vrf_id, is_in);
+ rv = nat44_ei_del_session (sm, &addr, port, proto, vrf_id, is_in);
REPLY_MACRO (VL_API_NAT44_DEL_SESSION_REPLY);
}