1452         if (avl_find(tree, addr, &where) != NULL)
1453                 return (B_FALSE);
1454 
1455         avl_insert(tree, addr, where);
1456         return (B_TRUE);
1457 }
1458 
1459 static void
1460 insert_slaac_prefix(mac_client_impl_t *mcip, nd_opt_prefix_info_t *po)
1461 {
1462         slaac_addr_t    *addr = NULL;
1463         in6_addr_t      *token = &mcip->mci_v6_mac_token;
1464 
1465         ASSERT(MUTEX_HELD(&mcip->mci_protect_lock));
1466 
1467         if (avl_numnodes(&mcip->mci_v6_slaac_ip) >= slaac_max_allowed) {
1468                 DTRACE_PROBE(limit__reached);
1469                 return;
1470         }
1471 
1472         if ((addr = kmem_zalloc(sizeof (slaac_addr_t),
1473             KM_NOSLEEP | KM_NORMALPRI)) == NULL)
1474                 return;
1475 
1476         bcopy(&po->nd_opt_pi_prefix, &addr->sla_prefix,
1477             sizeof (struct in6_addr));
1478 
1479         if (!insert_slaac_ip(&mcip->mci_v6_slaac_ip, token, addr)) {
1480                 kmem_free(addr, sizeof (slaac_addr_t));
1481         }
1482 }
1483 
1484 static void
1485 intercept_prefix_info(mac_client_impl_t *mcip, nd_opt_prefix_info_t *po)
1486 {
1487         if (8 * po->nd_opt_pi_len != sizeof (nd_opt_prefix_info_t)) {
1488                 DTRACE_PROBE(invalid__length);
1489                 return;
1490         }
1491 
1492         if (po->nd_opt_pi_prefix_len > 128) {
1493                 DTRACE_PROBE(invalid__plen);
 
 | 
 
 
1452         if (avl_find(tree, addr, &where) != NULL)
1453                 return (B_FALSE);
1454 
1455         avl_insert(tree, addr, where);
1456         return (B_TRUE);
1457 }
1458 
1459 static void
1460 insert_slaac_prefix(mac_client_impl_t *mcip, nd_opt_prefix_info_t *po)
1461 {
1462         slaac_addr_t    *addr = NULL;
1463         in6_addr_t      *token = &mcip->mci_v6_mac_token;
1464 
1465         ASSERT(MUTEX_HELD(&mcip->mci_protect_lock));
1466 
1467         if (avl_numnodes(&mcip->mci_v6_slaac_ip) >= slaac_max_allowed) {
1468                 DTRACE_PROBE(limit__reached);
1469                 return;
1470         }
1471 
1472         if ((addr = kmem_zalloc(sizeof (slaac_addr_t), KM_NOSLEEP_LAZY)) ==
1473             NULL)
1474                 return;
1475 
1476         bcopy(&po->nd_opt_pi_prefix, &addr->sla_prefix,
1477             sizeof (struct in6_addr));
1478 
1479         if (!insert_slaac_ip(&mcip->mci_v6_slaac_ip, token, addr)) {
1480                 kmem_free(addr, sizeof (slaac_addr_t));
1481         }
1482 }
1483 
1484 static void
1485 intercept_prefix_info(mac_client_impl_t *mcip, nd_opt_prefix_info_t *po)
1486 {
1487         if (8 * po->nd_opt_pi_len != sizeof (nd_opt_prefix_info_t)) {
1488                 DTRACE_PROBE(invalid__length);
1489                 return;
1490         }
1491 
1492         if (po->nd_opt_pi_prefix_len > 128) {
1493                 DTRACE_PROBE(invalid__plen);
 
 |