mirror of
https://github.com/zerotier/ZeroTierOne.git
synced 2025-06-05 20:13:44 +02:00
Merge a2f72d67f9
into f4053c8af3
This commit is contained in:
commit
d0935fa774
1 changed files with 3 additions and 3 deletions
|
@ -3163,13 +3163,13 @@ socket_t create_socket(const std::string &host, const std::string &ip, int port,
|
||||||
if (socket_options) { socket_options(sock); }
|
if (socket_options) { socket_options(sock); }
|
||||||
|
|
||||||
if (rp->ai_family == AF_INET6) {
|
if (rp->ai_family == AF_INET6) {
|
||||||
auto no = 0;
|
auto yes = 1;
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
setsockopt(sock, IPPROTO_IPV6, IPV6_V6ONLY,
|
setsockopt(sock, IPPROTO_IPV6, IPV6_V6ONLY,
|
||||||
reinterpret_cast<const char *>(&no), sizeof(no));
|
reinterpret_cast<const char *>(&yes), sizeof(yes));
|
||||||
#else
|
#else
|
||||||
setsockopt(sock, IPPROTO_IPV6, IPV6_V6ONLY,
|
setsockopt(sock, IPPROTO_IPV6, IPV6_V6ONLY,
|
||||||
reinterpret_cast<const void *>(&no), sizeof(no));
|
reinterpret_cast<const void *>(&yes), sizeof(yes));
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue