Skip to content

[22469] Avoid calling setIPv4 in TCPTransportInterface#5492

Merged
MiguelCompany merged 9 commits into
masterfrom
bugfix/copyAddress_in_TCPTransport
Jun 19, 2025
Merged

[22469] Avoid calling setIPv4 in TCPTransportInterface#5492
MiguelCompany merged 9 commits into
masterfrom
bugfix/copyAddress_in_TCPTransport

Conversation

@cferreiragonz

@cferreiragonz cferreiragonz commented Dec 13, 2024

Copy link
Copy Markdown
Contributor

Description

This PR adds a new method copyAddress which allows to copy the whole address of one locator to another. It uses this method to replace the setIPv4 method of TCPTransportInterace introduced in #5382 which caused undesired warnings.

It also excludes TCPv6 cases from this logic, leaving TCPv6 comms as before #5382.

@Mergifyio backport 3.1.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
  • 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)
  • N/A Changes are backport compatible: they do NOT break ABI nor change library core behavior.
  • N/A 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.

@cferreiragonz cferreiragonz added needs-review PR that is ready to be reviewed ci-pending PR which CI is running labels Dec 13, 2024
@cferreiragonz cferreiragonz added this to the v3.2.0 milestone Dec 13, 2024
@cferreiragonz
cferreiragonz requested review from richiprosima and removed request for richiprosima December 13, 2024 11:05
@MiguelCompany
MiguelCompany self-requested a review December 13, 2024 12:10
Comment thread include/fastdds/utils/IPLocator.hpp Outdated
Comment thread test/unittest/utils/LocatorTests.cpp
@cferreiragonz cferreiragonz added the temporarily-blocked PR must be merged after another one label Feb 4, 2025
@MiguelCompany MiguelCompany modified the milestones: v3.2.0, v3.3.0 Mar 17, 2025
@cferreiragonz
cferreiragonz force-pushed the bugfix/copyAddress_in_TCPTransport branch from 62a024b to efa36b3 Compare June 17, 2025 14:18
@cferreiragonz
cferreiragonz requested review from richiprosima and removed request for richiprosima June 17, 2025 14:18
@cferreiragonz
cferreiragonz force-pushed the bugfix/copyAddress_in_TCPTransport branch from efa36b3 to 9fa0768 Compare June 17, 2025 14:38
@cferreiragonz
cferreiragonz requested review from richiprosima and removed request for richiprosima June 17, 2025 14:39
Comment thread src/cpp/utils/IPLocator.cpp Outdated
Comment thread src/cpp/utils/IPLocator.cpp Outdated
Comment thread src/cpp/rtps/transport/TCPTransportInterface.cpp Outdated
@cferreiragonz
cferreiragonz requested review from richiprosima and removed request for richiprosima June 18, 2025 13:19
Mario-DL
Mario-DL previously approved these changes Jun 18, 2025

@Mario-DL Mario-DL left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM with green CI

@cferreiragonz
cferreiragonz requested review from richiprosima and removed request for richiprosima June 19, 2025 06:38
@cferreiragonz
cferreiragonz force-pushed the bugfix/copyAddress_in_TCPTransport branch from e8d8e7f to 50fea53 Compare June 19, 2025 06:45
@cferreiragonz
cferreiragonz requested review from richiprosima and removed request for richiprosima June 19, 2025 06:45
@cferreiragonz cferreiragonz removed the temporarily-blocked PR must be merged after another one label Jun 19, 2025
Signed-off-by: cferreiragonz <carlosferreira@eprosima.com>
Signed-off-by: cferreiragonz <carlosferreira@eprosima.com>
Signed-off-by: cferreiragonz <carlosferreira@eprosima.com>
Signed-off-by: cferreiragonz <carlosferreira@eprosima.com>
Signed-off-by: cferreiragonz <carlosferreira@eprosima.com>
Signed-off-by: cferreiragonz <carlosferreira@eprosima.com>
Signed-off-by: cferreiragonz <carlosferreira@eprosima.com>
Signed-off-by: cferreiragonz <carlosferreira@eprosima.com>
@cferreiragonz
cferreiragonz force-pushed the bugfix/copyAddress_in_TCPTransport branch from 50fea53 to d4ce08c Compare June 19, 2025 07:04
@cferreiragonz
cferreiragonz requested review from richiprosima and removed request for richiprosima June 19, 2025 07:05

@Mario-DL Mario-DL left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Couple of NITs

Comment thread src/cpp/utils/IPLocator.cpp Outdated
Comment thread include/fastdds/utils/IPLocator.hpp Outdated
Signed-off-by: cferreiragonz <carlosferreira@eprosima.com>

@Mario-DL Mario-DL left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM with green CI

@Mario-DL
Mario-DL requested review from Mario-DL and removed request for Mario-DL and MiguelCompany June 19, 2025 07:28
@MiguelCompany
MiguelCompany merged commit f2a55e9 into master Jun 19, 2025
22 checks passed
@MiguelCompany
MiguelCompany deleted the bugfix/copyAddress_in_TCPTransport branch June 19, 2025 14:57
@MiguelCompany

Copy link
Copy Markdown
Member

@Mergifyio backport 3.2.x 2.14.x

@mergify

mergify Bot commented Jun 19, 2025

Copy link
Copy Markdown
Contributor

backport 3.2.x 2.14.x

✅ Backports have been created

Details

mergify Bot pushed a commit that referenced this pull request Jun 19, 2025
* Refs #22469: Regression Tests for IPv6

Signed-off-by: cferreiragonz <carlosferreira@eprosima.com>

* Refs #22469: New method copyAddress

Signed-off-by: cferreiragonz <carlosferreira@eprosima.com>

* Refs #22469: Fix TCPTransportInterface

Signed-off-by: cferreiragonz <carlosferreira@eprosima.com>

* Refs #22469: Apply Review

Signed-off-by: cferreiragonz <carlosferreira@eprosima.com>

* Refs #22469: Disable grouping of locators in single channel for TCPv6

Signed-off-by: cferreiragonz <carlosferreira@eprosima.com>

* Refs #22469: Uncrustify

Signed-off-by: cferreiragonz <carlosferreira@eprosima.com>

* Refs #22469: Apply review

Signed-off-by: cferreiragonz <carlosferreira@eprosima.com>

* Refs #22469: Allow to copyIPv4 between two locators

Signed-off-by: cferreiragonz <carlosferreira@eprosima.com>

* Refs #22469: Apply Review 2

Signed-off-by: cferreiragonz <carlosferreira@eprosima.com>

---------

Signed-off-by: cferreiragonz <carlosferreira@eprosima.com>
(cherry picked from commit f2a55e9)

# Conflicts:
#	include/fastrtps/utils/IPLocator.h
#	src/cpp/rtps/transport/TCPTransportInterface.cpp
mergify Bot pushed a commit that referenced this pull request Jun 19, 2025
* Refs #22469: Regression Tests for IPv6

Signed-off-by: cferreiragonz <carlosferreira@eprosima.com>

* Refs #22469: New method copyAddress

Signed-off-by: cferreiragonz <carlosferreira@eprosima.com>

* Refs #22469: Fix TCPTransportInterface

Signed-off-by: cferreiragonz <carlosferreira@eprosima.com>

* Refs #22469: Apply Review

Signed-off-by: cferreiragonz <carlosferreira@eprosima.com>

* Refs #22469: Disable grouping of locators in single channel for TCPv6

Signed-off-by: cferreiragonz <carlosferreira@eprosima.com>

* Refs #22469: Uncrustify

Signed-off-by: cferreiragonz <carlosferreira@eprosima.com>

* Refs #22469: Apply review

Signed-off-by: cferreiragonz <carlosferreira@eprosima.com>

* Refs #22469: Allow to copyIPv4 between two locators

Signed-off-by: cferreiragonz <carlosferreira@eprosima.com>

* Refs #22469: Apply Review 2

Signed-off-by: cferreiragonz <carlosferreira@eprosima.com>

---------

Signed-off-by: cferreiragonz <carlosferreira@eprosima.com>
(cherry picked from commit f2a55e9)
MiguelCompany pushed a commit that referenced this pull request Jun 20, 2025
* Refs #22469: Regression Tests for IPv6



* Refs #22469: New method copyAddress



* Refs #22469: Fix TCPTransportInterface



* Refs #22469: Apply Review



* Refs #22469: Disable grouping of locators in single channel for TCPv6



* Refs #22469: Uncrustify



* Refs #22469: Apply review



* Refs #22469: Allow to copyIPv4 between two locators



* Refs #22469: Apply Review 2



---------


(cherry picked from commit f2a55e9)

Signed-off-by: cferreiragonz <carlosferreira@eprosima.com>
Co-authored-by: Carlos Ferreira González <carlosferreira@eprosima.com>
EugenioCollado pushed a commit that referenced this pull request Jul 2, 2025
* Refs #22469: Regression Tests for IPv6

Signed-off-by: cferreiragonz <carlosferreira@eprosima.com>

* Refs #22469: New method copyAddress

Signed-off-by: cferreiragonz <carlosferreira@eprosima.com>

* Refs #22469: Fix TCPTransportInterface

Signed-off-by: cferreiragonz <carlosferreira@eprosima.com>

* Refs #22469: Apply Review

Signed-off-by: cferreiragonz <carlosferreira@eprosima.com>

* Refs #22469: Disable grouping of locators in single channel for TCPv6

Signed-off-by: cferreiragonz <carlosferreira@eprosima.com>

* Refs #22469: Uncrustify

Signed-off-by: cferreiragonz <carlosferreira@eprosima.com>

* Refs #22469: Apply review

Signed-off-by: cferreiragonz <carlosferreira@eprosima.com>

* Refs #22469: Allow to copyIPv4 between two locators

Signed-off-by: cferreiragonz <carlosferreira@eprosima.com>

* Refs #22469: Apply Review 2

Signed-off-by: cferreiragonz <carlosferreira@eprosima.com>

---------

Signed-off-by: cferreiragonz <carlosferreira@eprosima.com>
Signed-off-by: Eugenio Collado <eugeniocollado@eprosima.com>
MiguelCompany pushed a commit that referenced this pull request Jul 3, 2025
* Refs #22469: Regression Tests for IPv6



* Refs #22469: New method copyAddress



* Refs #22469: Fix TCPTransportInterface



* Refs #22469: Apply Review



* Refs #22469: Disable grouping of locators in single channel for TCPv6



* Refs #22469: Uncrustify



* Refs #22469: Apply review



* Refs #22469: Allow to copyIPv4 between two locators



* Refs #22469: Apply Review 2



---------

Signed-off-by: cferreiragonz <carlosferreira@eprosima.com>
Signed-off-by: Eugenio Collado <eugeniocollado@eprosima.com>
Co-authored-by: Carlos Ferreira González <carlosferreira@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 needs-review PR that is ready to be reviewed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants