RTPS Discovery doesn't correctly parse IP addresses specified in an ini file. SedpLocalAddress is one, but the code below in RtpsDiscovery.cpp shows that SpdpLocalAddress uses the same technique, which is to incorrectly use ACE_INET_Addr::set() (that treats a string WITHOUT a ':' a being only a port number - see #1717 (comment).
NOTE: If the IP address is specified with a trailing colon (e.g. "169.254.5.198:") they are parsed correctly. This doesn't seem 'normal'.
} else if (name == "SedpLocalAddress") {
ACE_INET_Addr addr;
if (addr.set(it->second.c_str())) {
ACE_ERROR_RETURN((LM_ERROR,
ACE_TEXT("(%P|%t) ERROR: RtpsDiscovery::Config::discovery_config(): ")
ACE_TEXT("failed to parse SedpLocalAddress %C\n"),
it->second.c_str()),
-1);
}
config->sedp_local_address(addr);
} else if (name == "SpdpLocalAddress") {
ACE_INET_Addr addr;
if (addr.set(it->second.c_str())) {
ACE_ERROR_RETURN((LM_ERROR,
ACE_TEXT("(%P|%t) ERROR: RtpsDiscovery::Config::discovery_config(): ")
ACE_TEXT("failed to parse SpdpLocalAddress %C\n"),
it->second.c_str()),
-1);
}
config->spdp_local_address(addr);
RTPS Discovery doesn't correctly parse IP addresses specified in an ini file. SedpLocalAddress is one, but the code below in RtpsDiscovery.cpp shows that SpdpLocalAddress uses the same technique, which is to incorrectly use ACE_INET_Addr::set() (that treats a string WITHOUT a ':' a being only a port number - see #1717 (comment).
NOTE: If the IP address is specified with a trailing colon (e.g. "169.254.5.198:") they are parsed correctly. This doesn't seem 'normal'.