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/teib/teib_api.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/teib/teib_api.c')
-rw-r--r-- | src/vnet/teib/teib_api.c | 18 |
1 files changed, 5 insertions, 13 deletions
diff --git a/src/vnet/teib/teib_api.c b/src/vnet/teib/teib_api.c index b885128baf4..2cd56327efb 100644 --- a/src/vnet/teib/teib_api.c +++ b/src/vnet/teib/teib_api.c @@ -39,26 +39,19 @@ static void vl_api_teib_entry_add_del_t_handler (vl_api_teib_entry_add_del_t * mp) { vl_api_teib_entry_add_del_reply_t *rmp; - ip46_address_t nh; - ip_address_t peer; + ip_address_t peer, nh; int rv; VALIDATE_SW_IF_INDEX ((&mp->entry)); ip_address_decode2 (&mp->entry.peer, &peer); - ip_address_decode (&mp->entry.nh, &nh); + ip_address_decode2 (&mp->entry.nh, &nh); if (mp->is_add) rv = teib_entry_add (ntohl (mp->entry.sw_if_index), - ip_address_family_to_fib_proto (ip_addr_version - (&peer)), - &ip_addr_46 (&peer), ntohl (mp->entry.nh_table_id), - &nh); + &peer, ntohl (mp->entry.nh_table_id), &nh); else - rv = teib_entry_del (ntohl (mp->entry.sw_if_index), - ip_address_family_to_fib_proto (ip_addr_version - (&peer)), - &ip_addr_46 (&peer)); + rv = teib_entry_del (ntohl (mp->entry.sw_if_index), &peer); BAD_SW_IF_INDEX_LABEL; @@ -86,8 +79,7 @@ vl_api_teib_send_one (index_t nei, void *arg) ne = teib_entry_get (nei); pfx = teib_entry_get_nh (ne); - ip_address_encode (teib_entry_get_peer (ne), IP46_TYPE_ANY, - &mp->entry.peer); + ip_address_encode2 (teib_entry_get_peer (ne), &mp->entry.peer); ip_address_encode (&pfx->fp_addr, IP46_TYPE_ANY, &mp->entry.nh); mp->entry.nh_table_id = htonl (fib_table_get_table_id |