From 7f2a95965d0f7b012938c57a52726ca6c6a2f242 Mon Sep 17 00:00:00 2001 From: cferreiragonz Date: Tue, 27 May 2025 07:40:01 +0200 Subject: [PATCH 1/2] Refs #21670: Fix destructor in tests for 2.x Signed-off-by: cferreiragonz --- .../ddsrouter_core/dds/types/test_participants.hpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ddsrouter_core/test/blackbox/ddsrouter_core/dds/types/test_participants.hpp b/ddsrouter_core/test/blackbox/ddsrouter_core/dds/types/test_participants.hpp index 940880203..1b5a6f531 100644 --- a/ddsrouter_core/test/blackbox/ddsrouter_core/dds/types/test_participants.hpp +++ b/ddsrouter_core/test/blackbox/ddsrouter_core/dds/types/test_participants.hpp @@ -286,10 +286,6 @@ class TestSubscriber { if (participant_ != nullptr) { - if (topic_ != nullptr) - { - participant_->delete_topic(topic_); - } if (subscriber_ != nullptr) { if (reader_ != nullptr) @@ -298,6 +294,10 @@ class TestSubscriber } participant_->delete_subscriber(subscriber_); } + if (topic_ != nullptr) + { + participant_->delete_topic(topic_); + } eprosima::fastdds::dds::DomainParticipantFactory::get_instance()->delete_participant(participant_); } } From e10eb05042c7a981cac03b0f6c2037120e55a920 Mon Sep 17 00:00:00 2001 From: cferreiragonz Date: Wed, 18 Jun 2025 10:19:17 +0200 Subject: [PATCH 2/2] Refs #21670: Use whitelist for DS with Fast 2.x Signed-off-by: cferreiragonz --- .../test/blackbox/ddsrouter_core/dds/WAN/DDSTestWAN.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/ddsrouter_core/test/blackbox/ddsrouter_core/dds/WAN/DDSTestWAN.cpp b/ddsrouter_core/test/blackbox/ddsrouter_core/dds/WAN/DDSTestWAN.cpp index 26584f1f1..c5b1461ab 100644 --- a/ddsrouter_core/test/blackbox/ddsrouter_core/dds/WAN/DDSTestWAN.cpp +++ b/ddsrouter_core/test/blackbox/ddsrouter_core/dds/WAN/DDSTestWAN.cpp @@ -128,6 +128,13 @@ discovery_server_participant_configuration( ); } + // Localhost translation is never accomplished in DS with Fast DDS 2.x due to fixed GUIDs. + // TCPv6 suffers from this issue as it will not be able to make any connection. A whitelist is needed to enforce + // localhost connections. + // This issue is fixed in Fast DDS 3.x with machine_id based translations and non-fixed GUIDs DS's. + participants::types::WhitelistType lo_wl = (ip_version == participants::types::IpVersion::v4 ? "127.0.0.1" : "::1"); + conf.whitelist.insert(lo_wl); + conf.id = core::types::ParticipantId("WanDsParticipant_" + std::to_string((this_server_id_is_1 ? 1 : 0))); conf.discovery_server_guid_prefix = core::types::GuidPrefix((this_server_id_is_1 ? 1u : 0u));