Add support for 464XLAT NAT44 mode (VPP-1045)
[vpp.git] / src / plugins / nat / in2out.c
index 603abb8..b0dbbc8 100755 (executable)
@@ -179,6 +179,9 @@ snat_not_translate_fast (snat_main_t * sm, vlib_node_runtime_t *node,
                          u32 sw_if_index0, ip4_header_t * ip0, u32 proto0,
                          u32 rx_fib_index0)
 {
+  if (sm->out2in_dpo)
+    return 0;
+
   fib_node_index_t fei = FIB_NODE_INDEX_INVALID;
   fib_prefix_t pfx = {
     .fp_proto = FIB_PROTOCOL_IP4,
@@ -242,6 +245,9 @@ snat_not_translate (snat_main_t * sm, vlib_node_runtime_t *node,
   else
     return 0;
 
+  if (sm->forwarding_enabled)
+    return 1;
+
   return snat_not_translate_fast(sm, node, sw_if_index0, ip0, proto0,
                                  rx_fib_index0);
 }