Skip to content

[23213] Add localhost capability only to UDP & TCP transports#5864

Merged
MiguelCompany merged 3 commits intomasterfrom
bugfix/23213
Jun 11, 2025
Merged

[23213] Add localhost capability only to UDP & TCP transports#5864
MiguelCompany merged 3 commits intomasterfrom
bugfix/23213

Conversation

@juanlofer-eprosima
Copy link
Copy Markdown
Contributor

@juanlofer-eprosima juanlofer-eprosima commented Jun 10, 2025

Description

PR #3733 introduced a new proxy parameter (network configuration) used to transmit in discovery the information of whether transformation of locators to localhost can be applied for each transport kind. In this parameter, the value of each possible locator kind (powers of 2) is used to conform the binary mask corresponding to the network configuration parameter. However, in PR #5116 the value of shared memory kind was modified in a way that may pollute the values corresponding to UDP transport kinds.

This PR solves the issue by only setting the corresponding localhost network configuration for transports supporting it (UDP and TCP). It also adds an extra assertion verifying the bit operation can be safely done.

@Mergifyio backport 3.2.x 2.14.x

Contributor Checklist

  • Commit messages follow the project guidelines.
  • The code follows the style guidelines of this project.
  • Tests that thoroughly check the new feature have been added/Regression tests checking the bug and its fix have been added; the added tests pass locally
  • N/A Any new/modified methods have been properly documented using Doxygen.
  • N/A Any new configuration API has an equivalent XML API (with the corresponding XSD extension)
  • Changes are backport compatible: they do NOT break ABI nor change library core behavior.
  • Changes are API compatible.
  • N/A New feature has been added to the versions.md file (if applicable).
  • N/A New feature has been documented/Current behavior is correctly described in the documentation.
  • Applicable backports have been included in the description.

Reviewer Checklist

  • The PR has a milestone assigned.
  • The title and description correctly express the PR's purpose.
  • Check contributor checklist is correct.
  • If this is a critical bug fix, backports to the critical-only supported branches have been requested.
  • Check CI results: changes do not issue any warning.
  • Check CI results: failing tests are unrelated with the changes.

Signed-off-by: Juan Lopez Fernandez <juanlopez@eprosima.com>
@juanlofer-eprosima juanlofer-eprosima added this to the v3.2.3 milestone Jun 10, 2025
@github-actions github-actions bot added the ci-pending PR which CI is running label Jun 10, 2025
Signed-off-by: Juan Lopez Fernandez <juanlopez@eprosima.com>
@juanlofer-eprosima juanlofer-eprosima requested review from MiguelCompany and removed request for MiguelCompany June 10, 2025 09:17
@juanlofer-eprosima juanlofer-eprosima changed the title [23213] Only add localhost capability to UDP & TCP transports [23213] Add localhost capability only to UDP & TCP transports Jun 10, 2025
Signed-off-by: Juan Lopez Fernandez <juanlopez@eprosima.com>
@juanlofer-eprosima juanlofer-eprosima requested review from MiguelCompany and removed request for MiguelCompany June 10, 2025 13:55
@MiguelCompany MiguelCompany modified the milestones: v3.2.3, v3.3.0 Jun 11, 2025
@MiguelCompany
Copy link
Copy Markdown
Member

@Mergifyio backport 3.2.x 2.14.x

@MiguelCompany MiguelCompany merged commit 401ccad into master Jun 11, 2025
17 of 18 checks passed
@MiguelCompany MiguelCompany deleted the bugfix/23213 branch June 11, 2025 13:24
@mergify
Copy link
Copy Markdown
Contributor

mergify bot commented Jun 11, 2025

backport 3.2.x 2.14.x

✅ Backports have been created

Details

mergify bot pushed a commit that referenced this pull request Jun 11, 2025
* Refs #23213: Add regression test

Signed-off-by: Juan Lopez Fernandez <juanlopez@eprosima.com>

* Refs #23213: Only add localhost capability to UDP & TCP transports

Signed-off-by: Juan Lopez Fernandez <juanlopez@eprosima.com>

* Refs #23213: Update failing test

Signed-off-by: Juan Lopez Fernandez <juanlopez@eprosima.com>

---------

Signed-off-by: Juan Lopez Fernandez <juanlopez@eprosima.com>
(cherry picked from commit 401ccad)
mergify bot pushed a commit that referenced this pull request Jun 11, 2025
* Refs #23213: Add regression test

Signed-off-by: Juan Lopez Fernandez <juanlopez@eprosima.com>

* Refs #23213: Only add localhost capability to UDP & TCP transports

Signed-off-by: Juan Lopez Fernandez <juanlopez@eprosima.com>

* Refs #23213: Update failing test

Signed-off-by: Juan Lopez Fernandez <juanlopez@eprosima.com>

---------

Signed-off-by: Juan Lopez Fernandez <juanlopez@eprosima.com>
(cherry picked from commit 401ccad)

# Conflicts:
#	include/fastdds/rtps/builtin/data/NetworkConfiguration.hpp
#	src/cpp/CMakeLists.txt
#	src/cpp/rtps/builtin/discovery/participant/PDPSimple.cpp
#	test/blackbox/common/BlackboxTestsNetworkConf.cpp
#	test/blackbox/common/DDSBlackboxTestsMonitorService.cpp
#	test/unittest/dds/publisher/CMakeLists.txt
#	test/unittest/rtps/discovery/CMakeLists.txt
#	test/unittest/rtps/network/CMakeLists.txt
#	test/unittest/rtps/reader/CMakeLists.txt
#	test/unittest/statistics/dds/CMakeLists.txt
#	test/unittest/statistics/rtps/CMakeLists.txt
#	test/unittest/transport/CMakeLists.txt
juanlofer-eprosima added a commit that referenced this pull request Jun 12, 2025
Signed-off-by: Juan Lopez Fernandez <juanlopez@eprosima.com>
MiguelCompany pushed a commit that referenced this pull request Jun 13, 2025
* Refs #23213: Add regression test



* Refs #23213: Only add localhost capability to UDP & TCP transports



* Refs #23213: Update failing test



---------


(cherry picked from commit 401ccad)

Signed-off-by: Juan Lopez Fernandez <juanlopez@eprosima.com>
Co-authored-by: juanlofer-eprosima <88179026+juanlofer-eprosima@users.noreply.github.com>
MiguelCompany pushed a commit that referenced this pull request Jun 13, 2025
Signed-off-by: Juan Lopez Fernandez <juanlopez@eprosima.com>
Co-authored-by: Juan Lopez Fernandez <juanlopez@eprosima.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci-pending PR which CI is running

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants