From 72f2a3acb797797416a96dc10312ccd431126de7 Mon Sep 17 00:00:00 2001 From: Neale Ranns Date: Mon, 17 Jun 2019 15:43:38 +0000 Subject: 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 --- src/vnet/ipsec/ah_encrypt.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'src/vnet/ipsec/ah_encrypt.c') 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)) -- cgit 1.2.3-korg