aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/nat/nat_det_in2out.c
diff options
context:
space:
mode:
authorFilip Varga <fivarga@cisco.com>2020-05-07 14:28:56 +0200
committerOle Trøan <otroan@employees.org>2020-05-07 17:04:00 +0000
commit9bb09afb56b1aa787ca574cc732085272059fd5f (patch)
tree38a3051033c5ed864386969f710a07b89c224728 /src/plugins/nat/nat_det_in2out.c
parent5505ee8904fafc7c1f017f88853f80a616784cf2 (diff)
nat: fix per thread data vlib_main_t usage
Type: fix Change-Id: If6784c9eb278f525e05304d10fd1a00641faaaf0 Signed-off-by: Filip Varga <fivarga@cisco.com>
Diffstat (limited to 'src/plugins/nat/nat_det_in2out.c')
-rw-r--r--src/plugins/nat/nat_det_in2out.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/plugins/nat/nat_det_in2out.c b/src/plugins/nat/nat_det_in2out.c
index 057b26158fa..762b7b068e6 100644
--- a/src/plugins/nat/nat_det_in2out.c
+++ b/src/plugins/nat/nat_det_in2out.c
@@ -99,6 +99,7 @@ icmp_match_in2out_det (snat_main_t * sm, vlib_node_runtime_t * node,
snat_session_key_t * p_value, u8 * p_dont_translate,
void *d, void *e)
{
+ snat_main_per_thread_data_t *tsm = &sm->per_thread_data[thread_index];
icmp46_header_t *icmp0;
u32 sw_if_index0;
u32 rx_fib_index0;
@@ -226,7 +227,7 @@ icmp_match_in2out_det (snat_main_t * sm, vlib_node_runtime_t * node,
goto out;
}
- u32 now = (u32) vlib_time_now (sm->vlib_main);
+ u32 now = (u32) vlib_time_now (tsm->vlib_main);
ses0->state = SNAT_SESSION_ICMP_ACTIVE;
ses0->expire = now + sm->icmp_timeout;