mirror of
https://github.com/savoirfairelinux/opendht.git
synced 2026-11-08 12:28:42 +00:00
net: attempt to use the same port for IPv4 and IPv6 if 0
This commit is contained in:
1 parent
fbe8834e04
commit
2ac5157ab8
2 files changed
+20
-6
No files matched your search
+2
-2
@@ -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());
|
||||
|
||||
Reference in new issue
Block a user