summaryrefslogtreecommitdiff
path: root/cpp/src/Ice/Network.cpp
diff options
context:
space:
mode:
authorBenoit Foucher <benoit@zeroc.com>2017-03-01 19:42:52 +0100
committerBenoit Foucher <benoit@zeroc.com>2017-03-01 19:42:52 +0100
commit0a57f0b1841f51bc45ff2adc9ac19e114d695e43 (patch)
tree2ecab85164a70618fc0f861058f97194cb4e797e /cpp/src/Ice/Network.cpp
parentUWP build failure (diff)
downloadice-0a57f0b1841f51bc45ff2adc9ac19e114d695e43.tar.bz2
ice-0a57f0b1841f51bc45ff2adc9ac19e114d695e43.tar.xz
ice-0a57f0b1841f51bc45ff2adc9ac19e114d695e43.zip
Fixed ICE-7584 - discovery plugins now send multicast datagrams on all interfaces
Diffstat (limited to 'cpp/src/Ice/Network.cpp')
-rwxr-xr-xcpp/src/Ice/Network.cpp10
1 files changed, 4 insertions, 6 deletions
diff --git a/cpp/src/Ice/Network.cpp b/cpp/src/Ice/Network.cpp
index 05abc9528f9..b98ea329429 100755
--- a/cpp/src/Ice/Network.cpp
+++ b/cpp/src/Ice/Network.cpp
@@ -1664,9 +1664,8 @@ IceInternal::getHostsForEndpointExpand(const string& host, ProtocolSupport proto
}
vector<string>
-IceInternal::getInterfacesForMulticast(const string& intf, const Address& mcastAddr)
+IceInternal::getInterfacesForMulticast(const string& intf, ProtocolSupport protocolSupport)
{
- ProtocolSupport protocolSupport = getProtocolSupport(mcastAddr);
vector<string> interfaces = getHostsForEndpointExpand(intf, protocolSupport, true);
if(interfaces.empty())
{
@@ -1700,9 +1699,8 @@ IceInternal::getHostsForEndpointExpand(const string& host, ProtocolSupport proto
}
vector<string>
-IceInternal::getInterfacesForMulticast(const string& intf, const Address& mcastAddr)
+IceInternal::getInterfacesForMulticast(const string& intf, ProtocolSupport protocolSupport)
{
- ProtocolSupport protocolSupport = getProtocolSupport(mcastAddr);
vector<string> interfaces;
bool ipv4Wildcard = false;
if(isWildcard(intf, protocolSupport, ipv4Wildcard))
@@ -2069,7 +2067,7 @@ IceInternal::getRecvBufferSize(SOCKET fd)
void
IceInternal::setMcastGroup(SOCKET fd, const Address& group, const string& intf)
{
- vector<string> interfaces = getInterfacesForMulticast(intf, group);
+ vector<string> interfaces = getInterfacesForMulticast(intf, getProtocolSupport(group));
set<int> indexes;
for(vector<string>::const_iterator p = interfaces.begin(); p != interfaces.end(); ++p)
{
@@ -3068,7 +3066,7 @@ IceInternal::isIpAddress(const string& name)
#else
in_addr addr;
in6_addr addr6;
-
+
return inet_pton(AF_INET, name.c_str(), &addr) > 0 || inet_pton(AF_INET6, name.c_str(), &addr6) > 0;
#endif
} \ No newline at end of file