tcp: add option to pass opaque to next node
[vpp.git] / src / vnet / tcp / tcp_output.c
index abd674d..1adac95 100644 (file)
@@ -2063,7 +2063,11 @@ tcp_output_handle_packet (tcp_connection_t * tc0, vlib_buffer_t * b0,
     }
 
   /* If next_index is not drop use it */
-  *next0 = tc0->out_next_index ? tc0->out_next_index : *next0;
+  if (tc0->next_node_index)
+    {
+      *next0 = tc0->next_node_index;
+      vnet_buffer (b0)->tcp.next_node_opaque = tc0->next_node_opaque;
+    }
 
   vnet_buffer (b0)->sw_if_index[VLIB_TX] = tc0->c_fib_index;
   vnet_buffer (b0)->sw_if_index[VLIB_RX] = 0;