Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix remote locators filtering when whitelist provided #3933

Merged
merged 2 commits into from
Oct 24, 2023

Conversation

juanlofer-eprosima
Copy link
Contributor

@juanlofer-eprosima juanlofer-eprosima commented Oct 16, 2023

Description

PR #3733 introduced a regression in which remote locators were being wrongly discarded when a whitelist is provided. In particular, the PR replaced several calls to transform_remote_locator (which for a remote locator performs no transformation and always return true irrespective of whether a whitelist is provided) by is_locator_allowed (which discards remote locators when a whitelist is provided).
This PR fixes the issue by checking if a locator is remote before going through the is_locator_allowed filter (every place where transform_remote_locator->is_locator_allowed change was introduced).

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.
  • Changes are ABI compatible.
  • 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.
  • N/A Applicable backports have been included in the description.

Reviewer Checklist

  • The PR has a milestone assigned.
  • Check contributor checklist is correct.
  • 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 <[email protected]>
@MiguelCompany MiguelCompany added this to the v2.12.1 milestone Oct 18, 2023
Copy link
Member

@MiguelCompany MiguelCompany left a comment

Choose a reason for hiding this comment

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

Would be nice to have a regression test for this, but we will add it on a follow-up PR, since the fix has more urgency.

LGTM with green CI.

@MiguelCompany MiguelCompany added the ci-pending PR which CI is running label Oct 18, 2023
@MiguelCompany
Copy link
Member

@richiprosima Please test this

@MiguelCompany
Copy link
Member

@richiprosima Please test discovery-server, and also test mac

@MiguelCompany MiguelCompany merged commit 333f918 into master Oct 24, 2023
10 of 14 checks passed
@MiguelCompany MiguelCompany deleted the hotfix/whitelist-nonlocal-locator branch October 24, 2023 13:19
juanlofer-eprosima added a commit that referenced this pull request Nov 10, 2023
* Fix remote locators filtering when whitelist provided

Signed-off-by: Juan Lopez Fernandez <[email protected]>

* Apply suggestion

Signed-off-by: Juan Lopez Fernandez <[email protected]>

---------

Signed-off-by: Juan Lopez Fernandez <[email protected]>
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