ipsec: remove the set_key API
[vpp.git] / src / vnet / ipsec / ah_decrypt.c
index cf95588..734700d 100644 (file)
@@ -161,7 +161,7 @@ ah_decrypt_inline (vlib_main_t * vm,
            (&ipsec_sa_counters, thread_index, sa_index0,
             1, i_b0->current_length);
 
-         icv_size = sa0->integ_trunc_size;
+         icv_size = sa0->integ_icv_size;
          if (PREDICT_TRUE (sa0->integ_alg != IPSEC_INTEG_ALG_NONE))
            {
              u8 sig[64];
@@ -200,7 +200,7 @@ ah_decrypt_inline (vlib_main_t * vm,
                  goto trace;
                }
 
-             ipsec_sa_anti_replay_advance (sa0, &ah0->seq_no);
+             ipsec_sa_anti_replay_advance (sa0, ah0->seq_no);
            }
 
          vlib_buffer_advance (i_b0,
@@ -259,12 +259,9 @@ ah_decrypt_inline (vlib_main_t * vm,
            }
 
          /* for IPSec-GRE tunnel next node is ipsec-gre-input */
-         if (PREDICT_FALSE
-             ((vnet_buffer (i_b0)->ipsec.flags) &
-              IPSEC_FLAG_IPSEC_GRE_TUNNEL))
+         if (PREDICT_FALSE (ipsec_sa_is_set_IS_GRE (sa0)))
            next0 = AH_DECRYPT_NEXT_IPSEC_GRE_INPUT;
 
-
          vnet_buffer (i_b0)->sw_if_index[VLIB_TX] = (u32) ~ 0;
        trace:
          if (PREDICT_FALSE (i_b0->flags & VLIB_BUFFER_IS_TRACED))