summaryrefslogtreecommitdiffstats
path: root/src/plugins/nat/nat44_handoff.c
diff options
context:
space:
mode:
authorFilip Varga <fivarga@cisco.com>2020-05-12 13:42:45 +0200
committerOle Trøan <otroan@employees.org>2020-05-13 11:15:42 +0000
commit103d355db504527cc6fa1d563ce6976b8490d22c (patch)
tree0a5c7af838bcab4a9b542022984a2e7c6c5f6145 /src/plugins/nat/nat44_handoff.c
parent85af76af5c63c5fbe018a0765e252eea64efb0ea (diff)
nat: handoff next node feature fix
Type: fix Change-Id: I14e323e7bb1db7a3d40668212535c07504374e59 Signed-off-by: Filip Varga <fivarga@cisco.com>
Diffstat (limited to 'src/plugins/nat/nat44_handoff.c')
-rw-r--r--src/plugins/nat/nat44_handoff.c17
1 files changed, 15 insertions, 2 deletions
diff --git a/src/plugins/nat/nat44_handoff.c b/src/plugins/nat/nat44_handoff.c
index d221e5ba7cd..69b3b6083a7 100644
--- a/src/plugins/nat/nat44_handoff.c
+++ b/src/plugins/nat/nat44_handoff.c
@@ -100,6 +100,7 @@ nat44_worker_handoff_fn_inline (vlib_main_t * vm,
while (n_left_from >= 4)
{
+ u32 arc_next0, arc_next1, arc_next2, arc_next3;
u32 sw_if_index0, sw_if_index1, sw_if_index2, sw_if_index3;
u32 rx_fib_index0, rx_fib_index1, rx_fib_index2, rx_fib_index3;
u32 iph_offset0 = 0, iph_offset1 = 0, iph_offset2 = 0, iph_offset3 = 0;
@@ -134,6 +135,16 @@ nat44_worker_handoff_fn_inline (vlib_main_t * vm,
ip3 = (ip4_header_t *) ((u8 *) vlib_buffer_get_current (b[3]) +
iph_offset3);
+ vnet_feature_next (&arc_next0, b[0]);
+ vnet_feature_next (&arc_next1, b[1]);
+ vnet_feature_next (&arc_next2, b[2]);
+ vnet_feature_next (&arc_next3, b[3]);
+
+ vnet_buffer2 (b[0])->nat.arc_next = arc_next0;
+ vnet_buffer2 (b[1])->nat.arc_next = arc_next1;
+ vnet_buffer2 (b[2])->nat.arc_next = arc_next2;
+ vnet_buffer2 (b[3])->nat.arc_next = arc_next3;
+
sw_if_index0 = vnet_buffer (b[0])->sw_if_index[VLIB_RX];
sw_if_index1 = vnet_buffer (b[1])->sw_if_index[VLIB_RX];
sw_if_index2 = vnet_buffer (b[2])->sw_if_index[VLIB_RX];
@@ -186,6 +197,7 @@ nat44_worker_handoff_fn_inline (vlib_main_t * vm,
while (n_left_from > 0)
{
+ u32 arc_next0;
u32 sw_if_index0;
u32 rx_fib_index0;
u32 iph_offset0 = 0;
@@ -198,6 +210,9 @@ nat44_worker_handoff_fn_inline (vlib_main_t * vm,
ip0 = (ip4_header_t *) ((u8 *) vlib_buffer_get_current (b[0]) +
iph_offset0);
+ vnet_feature_next (&arc_next0, b[0]);
+ vnet_buffer2 (b[0])->nat.arc_next = arc_next0;
+
sw_if_index0 = vnet_buffer (b[0])->sw_if_index[VLIB_RX];
rx_fib_index0 = ip4_fib_table_get_index_for_sw_if_index (sw_if_index0);
@@ -262,8 +277,6 @@ nat44_worker_handoff_fn_inline (vlib_main_t * vm,
return frame->n_vectors;
}
-
-
VLIB_NODE_FN (snat_in2out_worker_handoff_node) (vlib_main_t * vm,
vlib_node_runtime_t * node,
vlib_frame_t * frame)