From 9cec2d6e892112eecbffcfe10aa8a55343411d9d Mon Sep 17 00:00:00 2001 From: Shane Loretz Date: Tue, 4 Apr 2023 16:14:13 +0000 Subject: [PATCH] Add multicast address to initial peer list when there are other static peers and SUBNET range Signed-off-by: Shane Loretz --- rmw_fastrtps_shared_cpp/src/participant.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rmw_fastrtps_shared_cpp/src/participant.cpp b/rmw_fastrtps_shared_cpp/src/participant.cpp index beeb2df45..a8fb35cef 100644 --- a/rmw_fastrtps_shared_cpp/src/participant.cpp +++ b/rmw_fastrtps_shared_cpp/src/participant.cpp @@ -250,11 +250,11 @@ rmw_fastrtps_shared_cpp::create_participant( RMW_AUTOMATIC_DISCOVERY_RANGE_SUBNET == discovery_options->automatic_discovery_range && domainParticipantQos.wire_protocol().builtin.initialPeersList.size()) { - // Need to add default the default multicast address + // Make sure we send an announcment on the multicast address eprosima::fastrtps::rtps::Locator_t locator; eprosima::fastrtps::rtps::IPLocator::setIPv4(locator, 239, 255, 0, 1); domainParticipantQos.wire_protocol() - .builtin.metatrafficMulticastLocatorList.push_back(locator); + .builtin.initialPeersList.push_back(locator); } size_t length = snprintf(nullptr, 0, "enclave=%s;", enclave) + 1;