summaryrefslogtreecommitdiffstats
path: root/src/plugins/nat/nat44-ed/nat44_ed_affinity.c
diff options
context:
space:
mode:
authorKlement Sekera <ksekera@cisco.com>2021-03-05 20:34:05 +0100
committerKlement Sekera <ksekera@cisco.com>2021-03-07 23:39:25 +0000
commite3416e307e263dc565546c4e748df99b584708a0 (patch)
treeb80f0f327fee5c9f946ab4f19b5d825e2828b7cc /src/plugins/nat/nat44-ed/nat44_ed_affinity.c
parent76401c5767ecdf701f4c77beee0b721c485321d5 (diff)
nat: replace main vlib with per-thread vlib
Fix incorrect vlib main usage. Type: fix Signed-off-by: Klement Sekera <ksekera@cisco.com> Change-Id: Ic5304ca844f1b27756818eb6995b1d9c08412674
Diffstat (limited to 'src/plugins/nat/nat44-ed/nat44_ed_affinity.c')
-rw-r--r--src/plugins/nat/nat44-ed/nat44_ed_affinity.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/plugins/nat/nat44-ed/nat44_ed_affinity.c b/src/plugins/nat/nat44-ed/nat44_ed_affinity.c
index 6debe401292..89f11c64ef3 100644
--- a/src/plugins/nat/nat44-ed/nat44_ed_affinity.c
+++ b/src/plugins/nat/nat44-ed/nat44_ed_affinity.c
@@ -140,9 +140,9 @@ nat_affinity_flush_service (u32 affinity_per_service_list_head_index)
}
int
-nat_affinity_find_and_lock (ip4_address_t client_addr,
+nat_affinity_find_and_lock (vlib_main_t *vm, ip4_address_t client_addr,
ip4_address_t service_addr, u8 proto,
- u16 service_port, u8 * backend_index)
+ u16 service_port, u8 *backend_index)
{
snat_main_t *sm = &snat_main;
nat_affinity_main_t *nam = &nat_affinity_main;
@@ -162,7 +162,7 @@ nat_affinity_find_and_lock (ip4_address_t client_addr,
/* if already expired delete */
if (a->ref_cnt == 0)
{
- if (a->expire < vlib_time_now (nam->vlib_main))
+ if (a->expire < vlib_time_now (vm))
{
clib_dlist_remove (nam->list_pool, a->per_service_index);
pool_put_index (nam->list_pool, a->per_service_index);