ipsec: Reference count the SAs
[vpp.git] / src / vnet / ipsec / ipsec_input.c
index 970211e..47220db 100644 (file)
@@ -61,9 +61,9 @@ format_ipsec_input_trace (u8 * s, va_list * args)
   CLIB_UNUSED (vlib_node_t * node) = va_arg (*args, vlib_node_t *);
   ipsec_input_trace_t *t = va_arg (*args, ipsec_input_trace_t *);
 
-  s = format (s, "%U: sa_id %u spd %u policy %d spi %u seq %u",
+  s = format (s, "%U: sa_id %u spd %u policy %d spi %u (0x%08x) seq %u",
              format_ip_protocol, t->proto, t->sa_id,
-             t->spd, t->policy_index, t->spi, t->seq);
+             t->spd, t->policy_index, t->spi, t->spi, t->seq);
 
   return s;
 }
@@ -253,7 +253,6 @@ VLIB_NODE_FN (ipsec4_input_node) (vlib_main_t * vm,
                     clib_net_to_host_u16 (ip0->length));
 
                  vnet_buffer (b0)->ipsec.sad_index = p0->sa_index;
-                 vnet_buffer (b0)->ipsec.flags = 0;
                  next0 = im->esp4_decrypt_next_index;
                  vlib_buffer_advance (b0, ((u8 *) esp0 - (u8 *) ip0));
                  goto trace0;
@@ -304,7 +303,6 @@ VLIB_NODE_FN (ipsec4_input_node) (vlib_main_t * vm,
                     clib_net_to_host_u16 (ip0->length));
 
                  vnet_buffer (b0)->ipsec.sad_index = p0->sa_index;
-                 vnet_buffer (b0)->ipsec.flags = 0;
                  next0 = im->ah4_decrypt_next_index;
                  goto trace1;
                }
@@ -450,7 +448,6 @@ VLIB_NODE_FN (ipsec6_input_node) (vlib_main_t * vm,
                     header_size);
 
                  vnet_buffer (b0)->ipsec.sad_index = p0->sa_index;
-                 vnet_buffer (b0)->ipsec.flags = 0;
                  next0 = im->esp6_decrypt_next_index;
                  vlib_buffer_advance (b0, header_size);
                  goto trace0;
@@ -479,7 +476,6 @@ VLIB_NODE_FN (ipsec6_input_node) (vlib_main_t * vm,
                     header_size);
 
                  vnet_buffer (b0)->ipsec.sad_index = p0->sa_index;
-                 vnet_buffer (b0)->ipsec.flags = 0;
                  next0 = im->ah6_decrypt_next_index;
                  goto trace0;
                }