diff options
author | Klement Sekera <ksekera@cisco.com> | 2021-03-15 16:34:01 +0100 |
---|---|---|
committer | Ole Tr�an <otroan@employees.org> | 2021-03-30 12:26:25 +0000 |
commit | eafb5db63f20975076de8e35932f1ed306a2743e (patch) | |
tree | 4c5f8d529c63bcb3d1fa29093ae7fd2dc6bf919b /src/plugins/nat/nat44-ei/nat44_ei_api.c | |
parent | 0b37034fef436e02dd739b3b2c05f03708229e4c (diff) |
nat: fix HA multi-worker issues
Use correct vlib_main() in various code parts. Fix tests.
Type: fix
Signed-off-by: Klement Sekera <ksekera@cisco.com>
Change-Id: Ia379f3b686599532dedaafad2278c4097a3f03f3
Diffstat (limited to 'src/plugins/nat/nat44-ei/nat44_ei_api.c')
-rw-r--r-- | src/plugins/nat/nat44-ei/nat44_ei_api.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/plugins/nat/nat44-ei/nat44_ei_api.c b/src/plugins/nat/nat44-ei/nat44_ei_api.c index 5ec07b0511f..427140ffb92 100644 --- a/src/plugins/nat/nat44-ei/nat44_ei_api.c +++ b/src/plugins/nat/nat44-ei/nat44_ei_api.c @@ -303,7 +303,8 @@ vl_api_nat44_ei_ha_set_listener_t_handler ( int rv; memcpy (&addr, &mp->ip_address, sizeof (addr)); - rv = nat_ha_set_listener (&addr, clib_net_to_host_u16 (mp->port), + rv = nat_ha_set_listener (vlib_get_main (), &addr, + clib_net_to_host_u16 (mp->port), clib_net_to_host_u32 (mp->path_mtu)); REPLY_MACRO (VL_API_NAT44_EI_HA_SET_LISTENER_REPLY); @@ -339,9 +340,9 @@ vl_api_nat44_ei_ha_set_failover_t_handler ( int rv; memcpy (&addr, &mp->ip_address, sizeof (addr)); - rv = - nat_ha_set_failover (&addr, clib_net_to_host_u16 (mp->port), - clib_net_to_host_u32 (mp->session_refresh_interval)); + rv = nat_ha_set_failover ( + vlib_get_main (), &addr, clib_net_to_host_u16 (mp->port), + clib_net_to_host_u32 (mp->session_refresh_interval)); REPLY_MACRO (VL_API_NAT44_EI_HA_SET_FAILOVER_REPLY); } |