teib: Add adj-fibs for peers/adjacencies on p2mp interface

Type: fix

Change-Id: I6fdc4e952097e92ac3aa53e0be3ef99e0d801b28
Signed-off-by: Neale Ranns <nranns@cisco.com>
diff --git a/src/vnet/teib/teib_api.c b/src/vnet/teib/teib_api.c
index 48bfee3..b885128 100644
--- a/src/vnet/teib/teib_api.c
+++ b/src/vnet/teib/teib_api.c
@@ -39,19 +39,26 @@
 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;