aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/nat
diff options
context:
space:
mode:
authorMatthew Smith <mgsmith@netgate.com>2019-04-01 16:27:00 -0500
committerOle Trøan <otroan@employees.org>2019-04-09 10:47:26 +0000
commit26e035bfcda580a8ce06df7498ca30e0a39b45ef (patch)
treec562137de47d41f862157f07ef0137f7c9eb5b33 /src/plugins/nat
parent796c84b25130c99cfd92cc9281416d377d41d2a3 (diff)
nat: initialize fq_in2out_output_index
When using the output feature ('postrouting') outbound translation, no packets are passed when using worker threads. The frame queue for in2out packets to be handed off between threads is never allocated. This is because that allocation only happens if the value of fq_in2out_output_index == ~0, but fq_in2out_output_index is never initialized prior to checking that. Initialize fq_in2out_output_index to ~0 so a frame queue will be allocated when there are worker threads. Change-Id: I0836685eb611348643c11ac7e4d0cab935a29384 Signed-off-by: Matthew Smith <mgsmith@netgate.com>
Diffstat (limited to 'src/plugins/nat')
-rwxr-xr-xsrc/plugins/nat/nat.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/plugins/nat/nat.c b/src/plugins/nat/nat.c
index 3856add419f..43ef325d591 100755
--- a/src/plugins/nat/nat.c
+++ b/src/plugins/nat/nat.c
@@ -2269,6 +2269,7 @@ snat_init (vlib_main_t * vm)
sm->workers = 0;
sm->port_per_thread = 0xffff - 1024;
sm->fq_in2out_index = ~0;
+ sm->fq_in2out_output_index = ~0;
sm->fq_out2in_index = ~0;
sm->udp_timeout = SNAT_UDP_TIMEOUT;
sm->tcp_established_timeout = SNAT_TCP_ESTABLISHED_TIMEOUT;