Skip to content
Snippets Groups Projects
Commit 7f7075ca authored by Adrien Béraud's avatar Adrien Béraud
Browse files

peerdiscovery: support IPV6_JOIN_GROUP

parent 9b9f12d8
No related branches found
No related tags found
No related merge requests found
......@@ -23,6 +23,10 @@
#define write(s, b, f) send(s, b, (int)strlen(b), 0)
#endif
#ifndef IPV6_JOIN_GROUP
#define IPV6_JOIN_GROUP IPV6_ADD_MEMBERSHIP
#endif
namespace dht {
namespace net {
......
......@@ -130,7 +130,7 @@ PeerDiscovery::socketJoinMulticast(int sockfd, sa_family_t family)
config_ipv6.ipv6mr_interface = 0;
inet_pton(AF_INET6, MULTICAST_ADDRESS_IPV6, &config_ipv6.ipv6mr_multiaddr);
if (setsockopt(sockfd, IPPROTO_IPV6, IPV6_ADD_MEMBERSHIP, &config_ipv6, sizeof(config_ipv6)) < 0){
if (setsockopt(sockfd, IPPROTO_IPV6, IPV6_JOIN_GROUP, &config_ipv6, sizeof(config_ipv6)) < 0){
throw std::runtime_error(std::string("Member Addition IPV6 Error: ") + strerror(errno));
}
break;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment