From 751bb131ef504b64fe82f393df21dba95ca92e97 Mon Sep 17 00:00:00 2001 From: Matthew Smith Date: Mon, 8 Feb 2021 22:13:59 +0000 Subject: Revert "ipsec: Use the new tunnel API types to add flow label and TTL copy" This reverts commit c7eaa711f3e25580687df0618e9ca80d3dc85e5f. Reason for revert: The jenkins job named 'vpp-merge-master-ubuntu1804-x86_64' had 2 IPv6 AH tests fail after the change was merged. Those 2 tests also failed the next time that job ran after an unrelated change was merged. Change-Id: I0e2c3ee895114029066c82624e79807af575b6c0 Signed-off-by: Matthew Smith --- src/vnet/ipsec/ipsec_itf.c | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) (limited to 'src/vnet/ipsec/ipsec_itf.c') diff --git a/src/vnet/ipsec/ipsec_itf.c b/src/vnet/ipsec/ipsec_itf.c index 5f04fcf0a04..4a0f9e7bb6c 100644 --- a/src/vnet/ipsec/ipsec_itf.c +++ b/src/vnet/ipsec/ipsec_itf.c @@ -70,11 +70,20 @@ ipsec_itf_adj_stack (adj_index_t ai, u32 sai) if (hw->flags & VNET_HW_INTERFACE_FLAG_LINK_UP) { const ipsec_sa_t *sa; - fib_prefix_t dst; sa = ipsec_sa_get (sai); - ip_address_to_fib_prefix (&sa->tunnel.t_dst, &dst); - adj_midchain_delegate_stack (ai, sa->tunnel.t_fib_index, &dst); + + /* *INDENT-OFF* */ + const fib_prefix_t dst = { + .fp_len = (ipsec_sa_is_set_IS_TUNNEL_V6(sa) ? 128 : 32), + .fp_proto = (ipsec_sa_is_set_IS_TUNNEL_V6(sa)? + FIB_PROTOCOL_IP6 : + FIB_PROTOCOL_IP4), + .fp_addr = sa->tunnel_dst_addr, + }; + /* *INDENT-ON* */ + + adj_midchain_delegate_stack (ai, sa->tx_fib_index, &dst); } else adj_midchain_delegate_unstack (ai); -- cgit 1.2.3-korg