Removed IPv6 multicast from Cygwin builds
This commit is contained in:
parent
15def0eaec
commit
b7dac7a6b1
1 changed files with 8 additions and 0 deletions
|
@ -1265,6 +1265,9 @@ int Socket::UDPConnection::bind(int port, std::string iface, const std::string &
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!multicastInterfaces.length()){
|
if (!multicastInterfaces.length()){
|
||||||
|
#ifdef __CYGWIN__
|
||||||
|
if (true){
|
||||||
|
#else
|
||||||
if (family == AF_INET6){
|
if (family == AF_INET6){
|
||||||
memcpy(&mreq6.ipv6mr_multiaddr, &((sockaddr_in6*)resmulti->ai_addr)->sin6_addr, sizeof(mreq6.ipv6mr_multiaddr));
|
memcpy(&mreq6.ipv6mr_multiaddr, &((sockaddr_in6*)resmulti->ai_addr)->sin6_addr, sizeof(mreq6.ipv6mr_multiaddr));
|
||||||
if (setsockopt(sock, IPPROTO_IPV6, IPV6_JOIN_GROUP, (char *)&mreq6, sizeof(mreq6)) != 0) {
|
if (setsockopt(sock, IPPROTO_IPV6, IPV6_JOIN_GROUP, (char *)&mreq6, sizeof(mreq6)) != 0) {
|
||||||
|
@ -1273,6 +1276,7 @@ int Socket::UDPConnection::bind(int port, std::string iface, const std::string &
|
||||||
result = -1;
|
result = -1;
|
||||||
}
|
}
|
||||||
}else{
|
}else{
|
||||||
|
#endif
|
||||||
mreq4.imr_multiaddr = ((sockaddr_in*)resmulti->ai_addr)->sin_addr;
|
mreq4.imr_multiaddr = ((sockaddr_in*)resmulti->ai_addr)->sin_addr;
|
||||||
mreq4.imr_interface.s_addr = INADDR_ANY;
|
mreq4.imr_interface.s_addr = INADDR_ANY;
|
||||||
if (setsockopt(sock, IPPROTO_IP, IP_ADD_MEMBERSHIP, (char *)&mreq4, sizeof(mreq4)) != 0) {
|
if (setsockopt(sock, IPPROTO_IP, IP_ADD_MEMBERSHIP, (char *)&mreq4, sizeof(mreq4)) != 0) {
|
||||||
|
@ -1295,6 +1299,9 @@ int Socket::UDPConnection::bind(int port, std::string iface, const std::string &
|
||||||
curIface = curIface.substr(1, curIface.size()-1);
|
curIface = curIface.substr(1, curIface.size()-1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#ifdef __CYGWIN__
|
||||||
|
if (true){
|
||||||
|
#else
|
||||||
if (family == AF_INET6){
|
if (family == AF_INET6){
|
||||||
INFO_MSG("Registering for IPv6 multicast on interface %s", curIface.c_str());
|
INFO_MSG("Registering for IPv6 multicast on interface %s", curIface.c_str());
|
||||||
if ((addr_ret = getaddrinfo(curIface.c_str(), 0, &hints, &reslocal)) != 0){
|
if ((addr_ret = getaddrinfo(curIface.c_str(), 0, &hints, &reslocal)) != 0){
|
||||||
|
@ -1309,6 +1316,7 @@ int Socket::UDPConnection::bind(int port, std::string iface, const std::string &
|
||||||
atLeastOne = true;
|
atLeastOne = true;
|
||||||
}
|
}
|
||||||
}else{
|
}else{
|
||||||
|
#endif
|
||||||
INFO_MSG("Registering for IPv4 multicast on interface %s", curIface.c_str());
|
INFO_MSG("Registering for IPv4 multicast on interface %s", curIface.c_str());
|
||||||
if ((addr_ret = getaddrinfo(curIface.c_str(), 0, &hints, &reslocal)) != 0){
|
if ((addr_ret = getaddrinfo(curIface.c_str(), 0, &hints, &reslocal)) != 0){
|
||||||
WARN_MSG("Unable to resolve IPv4 interface address %s: %s", curIface.c_str(), gai_strerror(addr_ret));
|
WARN_MSG("Unable to resolve IPv4 interface address %s: %s", curIface.c_str(), gai_strerror(addr_ret));
|
||||||
|
|
Loading…
Add table
Reference in a new issue