ipsec: esp-decrypt rework
[vpp.git] / src / vnet / vxlan-gbp / decap.c
index 7dc8d25..c520e25 100644 (file)
@@ -16,7 +16,7 @@
  */
 
 #include <vlib/vlib.h>
-#include <vnet/pg/pg.h>
+
 #include <vnet/vxlan-gbp/vxlan_gbp.h>
 
 typedef struct
@@ -309,7 +309,13 @@ vxlan_gbp_input (vlib_main_t * vm,
              else
                {
                  error0 = VXLAN_GBP_ERROR_NO_SUCH_TUNNEL;
-                 next0 = VXLAN_GBP_INPUT_NEXT_NO_TUNNEL;
+                 next0 = VXLAN_GBP_INPUT_NEXT_PUNT;
+                 if (is_ip4)
+                   b0->punt_reason =
+                     vxm->punt_no_such_tunnel[FIB_PROTOCOL_IP4];
+                 else
+                   b0->punt_reason =
+                     vxm->punt_no_such_tunnel[FIB_PROTOCOL_IP6];
                }
              b0->error = node->errors[error0];
            }
@@ -342,7 +348,13 @@ vxlan_gbp_input (vlib_main_t * vm,
              else
                {
                  error1 = VXLAN_GBP_ERROR_NO_SUCH_TUNNEL;
-                 next1 = VXLAN_GBP_INPUT_NEXT_NO_TUNNEL;
+                 next1 = VXLAN_GBP_INPUT_NEXT_PUNT;
+                 if (is_ip4)
+                   b1->punt_reason =
+                     vxm->punt_no_such_tunnel[FIB_PROTOCOL_IP4];
+                 else
+                   b1->punt_reason =
+                     vxm->punt_no_such_tunnel[FIB_PROTOCOL_IP6];
                }
              b1->error = node->errors[error1];
            }
@@ -444,7 +456,13 @@ vxlan_gbp_input (vlib_main_t * vm,
              else
                {
                  error0 = VXLAN_GBP_ERROR_NO_SUCH_TUNNEL;
-                 next0 = VXLAN_GBP_INPUT_NEXT_NO_TUNNEL;
+                 next0 = VXLAN_GBP_INPUT_NEXT_PUNT;
+                 if (is_ip4)
+                   b0->punt_reason =
+                     vxm->punt_no_such_tunnel[FIB_PROTOCOL_IP4];
+                 else
+                   b0->punt_reason =
+                     vxm->punt_no_such_tunnel[FIB_PROTOCOL_IP6];
                }
              b0->error = node->errors[error0];
            }