Code Review
/
vpp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
nat: fix per thread data vlib_main_t usage
[vpp.git]
/
src
/
plugins
/
nat
/
nat_det_in2out.c
diff --git
a/src/plugins/nat/nat_det_in2out.c
b/src/plugins/nat/nat_det_in2out.c
index
057b261
..
762b7b0
100644
(file)
--- 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_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;
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;
}
goto out;
}
- u32 now = (u32) vlib_time_now (sm->vlib_main);
+ u32 now = (u32) vlib_time_now (
t
sm->vlib_main);
ses0->state = SNAT_SESSION_ICMP_ACTIVE;
ses0->expire = now + sm->icmp_timeout;
ses0->state = SNAT_SESSION_ICMP_ACTIVE;
ses0->expire = now + sm->icmp_timeout;