summaryrefslogtreecommitdiffstats
path: root/src/vnet/ipsec/ah_encrypt.c
diff options
context:
space:
mode:
authorNeale Ranns <nranns@cisco.com>2019-06-17 15:43:38 +0000
committerDamjan Marion <dmarion@me.com>2019-06-17 20:24:52 +0000
commit72f2a3acb797797416a96dc10312ccd431126de7 (patch)
treee712168ebaea12b09299ac74e53842663dfef5a2 /src/vnet/ipsec/ah_encrypt.c
parent2f0522008ca168e5fff5d754e2ca280ef9366d58 (diff)
ipsec: One DPO per SA
An SA can be used only for ESP or AH nver both, so it needs only one coresponding DPO. Type: refactor Change-Id: I689060f795ee352245a0eaed0890a6b234c63d71 Signed-off-by: Neale Ranns <nranns@cisco.com>
Diffstat (limited to 'src/vnet/ipsec/ah_encrypt.c')
-rw-r--r--src/vnet/ipsec/ah_encrypt.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/vnet/ipsec/ah_encrypt.c b/src/vnet/ipsec/ah_encrypt.c
index 1620f877baa..d12ca6704f0 100644
--- a/src/vnet/ipsec/ah_encrypt.c
+++ b/src/vnet/ipsec/ah_encrypt.c
@@ -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))