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

There is no interaction on UDP transport if the host IDs are the same #4879

Open
1 task done
i-and opened this issue May 30, 2024 · 1 comment
Open
1 task done

There is no interaction on UDP transport if the host IDs are the same #4879

i-and opened this issue May 30, 2024 · 1 comment
Labels
in progress Issue or PR which is being reviewed

Comments

@i-and
Copy link

i-and commented May 30, 2024

Is there an already existing issue for this?

  • I have searched the existing issues

Expected behavior

Robust interaction is provided

Current behavior

Depending on the IPv4 address values on the hosts, communication between them over DDS may be broken.

Steps to reproduce

The example HelloWorld needs to be modified as follows:

  1. Simulate a host-ID match on two different hosts by returning a constant 16-bit value from the method uint16_t Host::compute_id(const fastdds::rtps::LocatorList& loc).
  2. Set a whitelist in the HelloWorldPublisher/HelloWorldSubscriber.

NOTE The probability of this situation in real life is quite high because the hash value containing the host id is only 16 bits in size. In addition, this value may change from launch to launch of the host, since it is calculated as MD5 for IPv4 interface addresses with physical links up.

Fast DDS version/commit

v2.14.1

Platform/Architecture

Ubuntu Focal 20.04 amd64

Transport layer

UDPv4

Additional context

Apparently, the problem is related to the erroneous filtering of the received Locator by the method:

bool NetworkFactory::is_locator_remote_or_allowed(
const Locator_t& locator,
bool is_fastdds_local) const
{
return (is_locator_supported(locator) && !is_fastdds_local) || is_locator_allowed(locator);
}

Possible correction:
return (is_locator_supported(locator) && !is_fastdds_local) || is_locator_remote_or_allowed(locator);

XML configuration file

No response

Relevant log output

No response

Network traffic capture

No response

@i-and i-and added the triage Issue pending classification label May 30, 2024
@elianalf
Copy link
Contributor

Hi @i-and,
thanks for your contribution.

Depending on the IPv4 address values on the hosts, communication between them over DDS may be broken.

Yes, this can happen but we actually don't think the probability of this situation occurring is really high.

In addition, this value may change from launch to launch of the host, since it is calculated as MD5 for IPv4 interface addresses with physical links up.

We will try to take the time to evaluate it and possibly improve it.

@elianalf elianalf added in progress Issue or PR which is being reviewed and removed triage Issue pending classification labels Jul 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in progress Issue or PR which is being reviewed
Projects
None yet
Development

No branches or pull requests

2 participants