struct sockaddr_in6 *sin6, sa6;
uint8_t enaddr[ETHER_ADDR_LEN];
uint8_t ipaddr[INET6_ADDRSTRLEN];
- int i, j, lo, hi, s, af;
+ int i, j, lo, hi, af;
/* Convert from the UTF-16LE string format to binary */
for (i = 0, j = 0; j < ETHER_ADDR_LEN; i += 6) {
return (-1);
}
- KERNEL_LOCK();
- s = splnet();
+ NET_LOCK_SHARED();
TAILQ_FOREACH(ifp, &ifnetlist, if_list) {
if (!memcmp(LLADDR(ifp->if_sadl), enaddr, ETHER_ADDR_LEN))
break;
}
if (ifp == NULL) {
- splx(s);
- KERNEL_UNLOCK();
+ NET_UNLOCK_SHARED();
return (-1);
}
else if (ifa6ll != NULL)
ifa = ifa6ll;
else {
- splx(s);
- KERNEL_UNLOCK();
+ NET_UNLOCK_SHARED();
return (-1);
}
}
break;
}
- splx(s);
- KERNEL_UNLOCK();
+ NET_UNLOCK_SHARED();
return (0);
}