|
|
|
@ -281,7 +281,7 @@ CNetAddr::CNetAddr(const struct in_addr& ipv4Addr)
|
|
|
|
|
CNetAddr::CNetAddr(const struct in6_addr& ipv6Addr, const uint32_t scope)
|
|
|
|
|
{
|
|
|
|
|
SetLegacyIPv6(Span<const uint8_t>(reinterpret_cast<const uint8_t*>(&ipv6Addr), sizeof(ipv6Addr)));
|
|
|
|
|
scopeId = scope;
|
|
|
|
|
m_scope_id = scope;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
bool CNetAddr::IsBindAny() const
|
|
|
|
@ -918,7 +918,7 @@ bool CService::GetSockAddr(struct sockaddr* paddr, socklen_t *addrlen) const
|
|
|
|
|
memset(paddrin6, 0, *addrlen);
|
|
|
|
|
if (!GetIn6Addr(&paddrin6->sin6_addr))
|
|
|
|
|
return false;
|
|
|
|
|
paddrin6->sin6_scope_id = scopeId;
|
|
|
|
|
paddrin6->sin6_scope_id = m_scope_id;
|
|
|
|
|
paddrin6->sin6_family = AF_INET6;
|
|
|
|
|
paddrin6->sin6_port = htons(port);
|
|
|
|
|
return true;
|
|
|
|
|