aboutsummaryrefslogtreecommitdiffstats
path: root/src/vnet/teib/teib_api.c
diff options
context:
space:
mode:
authorNeale Ranns <nranns@cisco.com>2020-09-02 14:46:53 +0000
committerNeale Ranns <nranns@cisco.com>2020-09-17 12:55:53 +0000
commit256b67bc8873f268d2cecd16183398352b9fcd16 (patch)
treebf8cf5055de239b1b91739fc33554c93382d72d5 /src/vnet/teib/teib_api.c
parentfc639ff2d7abd8599f59078fac99f731026215b3 (diff)
teib: Add adj-fibs for peers/adjacencies on p2mp interface
Type: fix Change-Id: I6fdc4e952097e92ac3aa53e0be3ef99e0d801b28 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.c17
1 files changed, 12 insertions, 5 deletions
diff --git a/src/vnet/teib/teib_api.c b/src/vnet/teib/teib_api.c
index 48bfee34fda..b885128baf4 100644
--- a/src/vnet/teib/teib_api.c
+++ b/src/vnet/teib/teib_api.c
@@ -39,19 +39,26 @@ 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 peer, nh;
+ ip46_address_t nh;
+ ip_address_t peer;
int rv;
VALIDATE_SW_IF_INDEX ((&mp->entry));
- ip_address_decode (&mp->entry.peer, &peer);
+ ip_address_decode2 (&mp->entry.peer, &peer);
ip_address_decode (&mp->entry.nh, &nh);
if (mp->is_add)
- rv = teib_entry_add (ntohl (mp->entry.sw_if_index), &peer,
- ntohl (mp->entry.nh_table_id), &nh);
+ 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);
else
- rv = teib_entry_del (ntohl (mp->entry.sw_if_index), &peer);
+ rv = teib_entry_del (ntohl (mp->entry.sw_if_index),
+ ip_address_family_to_fib_proto (ip_addr_version
+ (&peer)),
+ &ip_addr_46 (&peer));
BAD_SW_IF_INDEX_LABEL;