net: attempt to use the same port for IPv4 and IPv6 if 0

This commit is contained in:
Adrien Béraud committed 2019-06-22 21:30:49 -04:00
1 parent fbe8834e04
commit 2ac5157ab8
2 files changed
+20 -6

No files matched your search

+2 -2
View File
@@ -216,11 +216,11 @@ SockAddr::getMappedIPv4()
}
SockAddr
SockAddr::getMappedIPv6() const
SockAddr::getMappedIPv6()
{
auto family = getFamily();
if (family != AF_INET)
return *this;
return std::move(*this);
SockAddr ret;
ret.setFamily(AF_INET6);
ret.setPort(getPort());