Skip to content

Commit 501a6d1

Browse files
committed
Refs #21670: Use whitelist for DS with Fast 2.x
Signed-off-by: cferreiragonz <carlosferreira@eprosima.com>
1 parent 7f2a959 commit 501a6d1

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

ddsrouter_core/test/blackbox/ddsrouter_core/dds/WAN/DDSTestWAN.cpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,14 @@ discovery_server_participant_configuration(
128128
);
129129
}
130130

131+
// Localhost translation is never accomplished in DS with Fast DDS 2.x due to fixed GUIDs.
132+
// TCPv6 suffers from this issue as it will not be able to make any connection. A whitelist is needed to enforce
133+
// localhost connections.
134+
// This issue is fixed in Fast DDS 3.x with machine_id based translations and non-fixed GUIDs DS's.
135+
participants::types::WhitelistType lo_wl = (ip_version == participants::types::IpVersion::v4 ?
136+
"127.0.0.1" : "::1");
137+
conf.whitelist.insert(lo_wl);
138+
131139
conf.id = core::types::ParticipantId("WanDsParticipant_" + std::to_string((this_server_id_is_1 ? 1 : 0)));
132140

133141
conf.discovery_server_guid_prefix = core::types::GuidPrefix((this_server_id_is_1 ? 1u : 0u));

0 commit comments

Comments
 (0)