summaryrefslogtreecommitdiffstats
path: root/src/vnet/gre
diff options
context:
space:
mode:
authorNeale Ranns <nranns@cisco.com>2020-09-17 12:56:47 +0000
committerFlorin Coras <florin.coras@gmail.com>2020-09-17 14:46:07 +0000
commite6b83059af3365ab12bbe93655a7dea6f691dbda (patch)
tree7b15b70d2d8a24a5c7dc53ad69a3fb7318fb1383 /src/vnet/gre
parent5ef25165b505f761a099e6c3bc06569cfef74f26 (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/gre')
-rw-r--r--src/vnet/gre/gre.c4
-rw-r--r--src/vnet/gre/interface.c14
2 files changed, 10 insertions, 8 deletions
diff --git a/src/vnet/gre/gre.c b/src/vnet/gre/gre.c
index f4c41bd09b4..439c542b291 100644
--- a/src/vnet/gre/gre.c
+++ b/src/vnet/gre/gre.c
@@ -472,8 +472,8 @@ mgre_update_adj (vnet_main_t * vnm, u32 sw_if_index, adj_index_t ai)
ti = gm->tunnel_index_by_sw_if_index[sw_if_index];
t = pool_elt_at_index (gm->tunnels, ti);
- ne = teib_entry_find (sw_if_index,
- adj->ia_nh_proto, &adj->sub_type.nbr.next_hop);
+ ne = teib_entry_find_46 (sw_if_index,
+ adj->ia_nh_proto, &adj->sub_type.nbr.next_hop);
if (NULL == ne)
// no NHRP entry to provide the next-hop
diff --git a/src/vnet/gre/interface.c b/src/vnet/gre/interface.c
index f5a1bde527f..48eec35d8ff 100644
--- a/src/vnet/gre/interface.c
+++ b/src/vnet/gre/interface.c
@@ -210,7 +210,7 @@ static void
gre_teib_entry_added (const teib_entry_t * ne)
{
gre_main_t *gm = &gre_main;
- const ip46_address_t *nh;
+ const ip_address_t *nh;
gre_tunnel_key_t key;
gre_tunnel_t *t;
u32 sw_if_index;
@@ -244,16 +244,17 @@ gre_teib_entry_added (const teib_entry_t * ne)
};
nh = teib_entry_get_peer (ne);
adj_nbr_walk_nh (teib_entry_get_sw_if_index (ne),
- (ip46_address_is_ip4 (nh) ?
+ (AF_IP4 == ip_addr_version (nh) ?
FIB_PROTOCOL_IP4 :
- FIB_PROTOCOL_IP6), nh, mgre_mk_complete_walk, &ctx);
+ FIB_PROTOCOL_IP6),
+ &ip_addr_46 (nh), mgre_mk_complete_walk, &ctx);
}
static void
gre_teib_entry_deleted (const teib_entry_t * ne)
{
gre_main_t *gm = &gre_main;
- const ip46_address_t *nh;
+ const ip_address_t *nh;
gre_tunnel_key_t key;
gre_tunnel_t *t;
u32 sw_if_index;
@@ -278,9 +279,10 @@ gre_teib_entry_deleted (const teib_entry_t * ne)
/* make all the adjacencies incomplete */
adj_nbr_walk_nh (teib_entry_get_sw_if_index (ne),
- (ip46_address_is_ip4 (nh) ?
+ (AF_IP4 == ip_addr_version (nh) ?
FIB_PROTOCOL_IP4 :
- FIB_PROTOCOL_IP6), nh, mgre_mk_incomplete_walk, t);
+ FIB_PROTOCOL_IP6),
+ &ip_addr_46 (nh), mgre_mk_incomplete_walk, t);
}
static walk_rc_t