[posix] fix netif use of IPv6 Prefix Match method (#5305)

This commit is contained in:
Abtin Keshavarzian
2020-07-28 10:48:18 -07:00
committed by GitHub
parent d46c03b588
commit 1dd46f9d93
+2 -1
View File
@@ -292,7 +292,8 @@ static void InitNetaskWithPrefixLength(struct in6_addr *address, uint8_t prefixL
static uint8_t NetmaskToPrefixLength(const struct sockaddr_in6 *netmask)
{
return ot::Ip6::Address::PrefixMatch(netmask->sin6_addr.s6_addr, allOnes, 128);
return otIp6PrefixMatch(static_cast<const otIp6Address *>(netmask->sin6_addr.s6_addr),
static_cast<const otIp6Address *>(allOnes));
}
#endif