ipsec: One DPO per SA
[vpp.git] / src / vnet / ipsec / ah_encrypt.c
index 1620f87..d12ca67 100644 (file)
@@ -294,9 +294,8 @@ ah_encrypt_inline (vlib_main_t * vm,
                            &sa0->ip4_hdr.address_pair,
                            sizeof (ip4_address_t));
 
-         next[0] = sa0->dpo[IPSEC_PROTOCOL_AH].dpoi_next_node;
-         vnet_buffer (b[0])->ip.adj_index[VLIB_TX] =
-           sa0->dpo[IPSEC_PROTOCOL_AH].dpoi_index;
+         next[0] = sa0->dpo.dpoi_next_node;
+         vnet_buffer (b[0])->ip.adj_index[VLIB_TX] = sa0->dpo.dpoi_index;
        }
       else if (is_ip6 && ipsec_sa_is_set_IS_TUNNEL (sa0) &&
               ipsec_sa_is_set_IS_TUNNEL_V6 (sa0))
@@ -304,9 +303,8 @@ ah_encrypt_inline (vlib_main_t * vm,
          clib_memcpy_fast (&oh6_0->ip6.src_address,
                            &sa0->ip6_hdr.src_address,
                            sizeof (ip6_address_t) * 2);
-         next[0] = sa0->dpo[IPSEC_PROTOCOL_AH].dpoi_next_node;
-         vnet_buffer (b[0])->ip.adj_index[VLIB_TX] =
-           sa0->dpo[IPSEC_PROTOCOL_AH].dpoi_index;
+         next[0] = sa0->dpo.dpoi_next_node;
+         vnet_buffer (b[0])->ip.adj_index[VLIB_TX] = sa0->dpo.dpoi_index;
        }
 
       if (PREDICT_TRUE (sa0->integ_op_id))