diff options
author | Neale Ranns <nranns@cisco.com> | 2020-09-17 12:56:47 +0000 |
---|---|---|
committer | Florin Coras <florin.coras@gmail.com> | 2020-09-17 14:46:07 +0000 |
commit | e6b83059af3365ab12bbe93655a7dea6f691dbda (patch) | |
tree | 7b15b70d2d8a24a5c7dc53ad69a3fb7318fb1383 /src/vnet/ipsec/ipsec_tun.c | |
parent | 5ef25165b505f761a099e6c3bc06569cfef74f26 (diff) |
teib: Use ip_address_t not ip46_address_t
Type: improvement
Change-Id: Ica75c4e43d6198658a1954640c7ac56ea68bb39a
Signed-off-by: Neale Ranns <nranns@cisco.com>
Diffstat (limited to 'src/vnet/ipsec/ipsec_tun.c')
-rw-r--r-- | src/vnet/ipsec/ipsec_tun.c | 28 |
1 files changed, 5 insertions, 23 deletions
diff --git a/src/vnet/ipsec/ipsec_tun.c b/src/vnet/ipsec/ipsec_tun.c index ac8b24ec232..9d352e75075 100644 --- a/src/vnet/ipsec/ipsec_tun.c +++ b/src/vnet/ipsec/ipsec_tun.c @@ -713,14 +713,8 @@ ipsec_tun_protect_update (u32 sw_if_index, { /* tunnel has no destination address, presumably because it's p2mp in which case we use the nh that this is protection for */ - ip46_address_t peer; - - ip_address_to_46 (nh, &peer); - ipsec_tun_protect_update_from_teib - (itp, teib_entry_find (sw_if_index, - ip_address_family_to_fib_proto - (ip_addr_version (nh)), &peer)); + (itp, teib_entry_find (sw_if_index, nh)); } if (is_l2) @@ -886,17 +880,11 @@ ipsec_tun_protect_adj_delegate_format (const adj_delegate_t * aed, u8 * s) static void ipsec_tun_teib_entry_added (const teib_entry_t * ne) { - const ip46_address_t *peer46; ipsec_tun_protect_t *itp; - ip_address_t peer; index_t itpi; - peer46 = teib_entry_get_peer (ne); - ip_address_from_46 (peer46, - (ip46_address_is_ip4 (peer46) ? - FIB_PROTOCOL_IP4 : FIB_PROTOCOL_IP6), &peer); - - itpi = ipsec_tun_protect_find (teib_entry_get_sw_if_index (ne), &peer); + itpi = ipsec_tun_protect_find (teib_entry_get_sw_if_index (ne), + teib_entry_get_peer (ne)); if (INDEX_INVALID == itpi) return; @@ -913,17 +901,11 @@ ipsec_tun_teib_entry_added (const teib_entry_t * ne) static void ipsec_tun_teib_entry_deleted (const teib_entry_t * ne) { - const ip46_address_t *peer46; ipsec_tun_protect_t *itp; - ip_address_t peer; index_t itpi; - peer46 = teib_entry_get_peer (ne); - ip_address_from_46 (peer46, - (ip46_address_is_ip4 (peer46) ? - FIB_PROTOCOL_IP4 : FIB_PROTOCOL_IP6), &peer); - - itpi = ipsec_tun_protect_find (teib_entry_get_sw_if_index (ne), &peer); + itpi = ipsec_tun_protect_find (teib_entry_get_sw_if_index (ne), + teib_entry_get_peer (ne)); if (INDEX_INVALID == itpi) return; |