summaryrefslogtreecommitdiffstats
path: root/src/vnet/ipsec/ipsec_format.c
diff options
context:
space:
mode:
authorNeale Ranns <neale@graphiant.com>2021-02-09 14:04:02 +0000
committerMatthew Smith <mgsmith@netgate.com>2021-02-10 13:39:37 +0000
commit9ec846c2684b69f47505d73ea9f873b793a11558 (patch)
tree78b1f3ced7dcee5d925f5c715b7e2ba99d5cdd95 /src/vnet/ipsec/ipsec_format.c
parent98d82ca04ba438cd2ba3c03de6e1e82e4786cd83 (diff)
ipsec: Use the new tunnel API types to add flow label and TTL copy
support Type: feature attmpet 2. this includes changes in ah_encrypt that don't use uninitialised memory when doing tunnel mode fixups. Signed-off-by: Neale Ranns <neale@graphiant.com> Change-Id: Ie3cb776f5c415c93b8a5ee22f22586fd0181110d
Diffstat (limited to 'src/vnet/ipsec/ipsec_format.c')
-rw-r--r--src/vnet/ipsec/ipsec_format.c22
1 files changed, 1 insertions, 21 deletions
diff --git a/src/vnet/ipsec/ipsec_format.c b/src/vnet/ipsec/ipsec_format.c
index 19321e7e347..001aa010364 100644
--- a/src/vnet/ipsec/ipsec_format.c
+++ b/src/vnet/ipsec/ipsec_format.c
@@ -273,7 +273,6 @@ format_ipsec_sa (u8 * s, va_list * args)
ipsec_format_flags_t flags = va_arg (*args, ipsec_format_flags_t);
ipsec_main_t *im = &ipsec_main;
vlib_counter_t counts;
- u32 tx_table_id;
ipsec_sa_t *sa;
if (pool_is_free_index (im->sad, sai))
@@ -318,26 +317,7 @@ format_ipsec_sa (u8 * s, va_list * args)
s = format (s, "\n packets %u bytes %u", counts.packets, counts.bytes);
if (ipsec_sa_is_set_IS_TUNNEL (sa))
- {
- tx_table_id = fib_table_get_table_id (
- sa->tx_fib_index,
- (ipsec_sa_is_set_IS_TUNNEL_V6 (sa) ? FIB_PROTOCOL_IP6 :
- FIB_PROTOCOL_IP4));
- s = format (s, "\n table-ID %d tunnel %U src %U dst %U flags %U",
- tx_table_id,
- format_ip_dscp, sa->dscp,
- format_ip46_address, &sa->tunnel_src_addr, IP46_TYPE_ANY,
- format_ip46_address, &sa->tunnel_dst_addr, IP46_TYPE_ANY,
- format_tunnel_encap_decap_flags, sa->tunnel_flags);
- if (!ipsec_sa_is_set_IS_INBOUND (sa))
- {
- s =
- format (s, "\n resovle via fib-entry: %d",
- sa->fib_entry_index);
- s = format (s, "\n stacked on:");
- s = format (s, "\n %U", format_dpo_id, &sa->dpo, 6);
- }
- }
+ s = format (s, "\n%U", format_tunnel, &sa->tunnel, 3);
done:
return (s);