aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins
diff options
context:
space:
mode:
authorBenoît Ganne <bganne@cisco.com>2020-11-25 14:32:53 +0100
committerOle Tr�an <otroan@employees.org>2020-12-02 10:12:16 +0000
commit4abc86639249f5c1ed2e0133dc336de549c96c40 (patch)
tree5343d79eb5192721af1927d0541bb80eaf13a433 /src/plugins
parent46d6864b9de6d722c4b6eb72d231918b251e267d (diff)
nat: use correct per-thread vlib_main
Using vlib_main of another thread is prohibited. Type: fix Change-Id: I9a85a5fee5c6665d423b4306faf3b3f2c5e22f99 Signed-off-by: Benoît Ganne <bganne@cisco.com>
Diffstat (limited to 'src/plugins')
-rw-r--r--src/plugins/nat/lib/ipfix_logging.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/plugins/nat/lib/ipfix_logging.c b/src/plugins/nat/lib/ipfix_logging.c
index f66458572d3..2fb8912226d 100644
--- a/src/plugins/nat/lib/ipfix_logging.c
+++ b/src/plugins/nat/lib/ipfix_logging.c
@@ -544,7 +544,7 @@ nat_ipfix_send (u32 thread_index, flow_report_main_t * frm,
ipfix_set_header_t *s = 0;
ip4_header_t *ip;
udp_header_t *udp;
- vlib_main_t *vm = vlib_mains[thread_index];
+ vlib_main_t *vm = vlib_get_main ();
tp = vlib_buffer_get_current (b0);
ip = (ip4_header_t *) & tp->ip4;
@@ -588,7 +588,7 @@ nat_ipfix_logging_nat44_ses (u32 thread_index, u8 nat_event, u32 src_ip,
vlib_buffer_t *b0 = 0;
u32 bi0 = ~0;
u32 offset;
- vlib_main_t *vm = vlib_mains[thread_index];
+ vlib_main_t *vm = vlib_get_main ();
u64 now;
u8 proto;
u16 template_id;
@@ -692,7 +692,7 @@ nat_ipfix_logging_addr_exhausted (u32 thread_index, u32 pool_id, int do_flush)
vlib_buffer_t *b0 = 0;
u32 bi0 = ~0;
u32 offset;
- vlib_main_t *vm = vlib_mains[thread_index];
+ vlib_main_t *vm = vlib_get_main ();
u64 now;
u8 nat_event = NAT_ADDRESSES_EXHAUTED;
u16 template_id;
@@ -777,7 +777,7 @@ nat_ipfix_logging_max_entries_per_usr (u32 thread_index,
vlib_buffer_t *b0 = 0;
u32 bi0 = ~0;
u32 offset;
- vlib_main_t *vm = vlib_mains[thread_index];
+ vlib_main_t *vm = vlib_get_main ();
u64 now;
u8 nat_event = QUOTA_EXCEEDED;
u32 quota_event = MAX_ENTRIES_PER_USER;
@@ -868,7 +868,7 @@ nat_ipfix_logging_max_ses (u32 thread_index, u32 limit, int do_flush)
vlib_buffer_t *b0 = 0;
u32 bi0 = ~0;
u32 offset;
- vlib_main_t *vm = vlib_mains[thread_index];
+ vlib_main_t *vm = vlib_get_main ();
u64 now;
u8 nat_event = QUOTA_EXCEEDED;
u32 quota_event = MAX_SESSION_ENTRIES;
@@ -956,7 +956,7 @@ nat_ipfix_logging_max_bib (u32 thread_index, u32 limit, int do_flush)
vlib_buffer_t *b0 = 0;
u32 bi0 = ~0;
u32 offset;
- vlib_main_t *vm = vlib_mains[thread_index];
+ vlib_main_t *vm = vlib_get_main ();
u64 now;
u8 nat_event = QUOTA_EXCEEDED;
u32 quota_event = MAX_BIB_ENTRIES;
@@ -1047,7 +1047,7 @@ nat_ipfix_logging_nat64_bibe (u32 thread_index, u8 nat_event,
vlib_buffer_t *b0 = 0;
u32 bi0 = ~0;
u32 offset;
- vlib_main_t *vm = vlib_mains[thread_index];
+ vlib_main_t *vm = vlib_get_main ();
u64 now;
u16 template_id;
@@ -1151,7 +1151,7 @@ nat_ipfix_logging_nat64_ses (u32 thread_index, u8 nat_event,
vlib_buffer_t *b0 = 0;
u32 bi0 = ~0;
u32 offset;
- vlib_main_t *vm = vlib_mains[thread_index];
+ vlib_main_t *vm = vlib_get_main ();
u64 now;
u16 template_id;