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

Remove bind-to-device support where unavailable #773

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

EriComic
Copy link

@EriComic EriComic commented Oct 3, 2024

On freeBSD-like network stacks, the SO_BINDTODEVICE socket option is not available. Since there is no suitable replacement for this socket option, we ignore the 'device' configuration option on systems missing the option and emit a warning instead.

This makes vsomeip compatible with the new io-sock network stack on QNX 7.1+.

Co-author: Daniel Freiermuth danielfr@haleytek.com @danielfr-haleytek

EriComic and others added 2 commits October 3, 2024 10:33
On freeBSD-like network stacks, the SO_BINDTODEVICE socket option is
not available. Since there is no suitable replacement for this socket
option, we ignore the 'device' configuration option on systems missing
the option and emit a warning instead.

This makes vsomeip compatible with the new io-sock network stack on
QNX 7.1+.

Co-author: Daniel Freiermuth danielfr@haleytek.com @danielfr-haleytek
@danielfr-haleytek danielfr-haleytek mentioned this pull request Oct 7, 2024
@duartenfonseca
Copy link
Collaborator

@EriComic does this mean that without the SO_BINDTODEVICE, you aren't able to bind and connect to another device?

@EriComic
Copy link
Author

EriComic commented Oct 8, 2024

@duartenfonseca Specifically it is to bind to the interface instead of just binding to the IP like we normally do. After a lot of exhaustive research in trying to find a freeBSD alternative, we found that there sadly isn't a proper replacement for this. The functionality could be brought back but the implementation would be very use-case specific and would not belong here. It is worth noting is that QNX's port of vsomeip also deprecates the feature.

So we moved on to evaluating if the functionality is truly needed. As mentioned, this functionality allows binding to the interface instead of just the IP. This allows for things like:

  • Filtering traffic to a single interface in multi-interface systems where the interfaces share the same IP
  • Listen to traffic from an interface instead in cases where IPs have been changed/don't have an IP

These use cases (and ones like it) are so specialized that traditional IP binding wouldn't work. Therefore, we decided to deprecate the feature and leave re-implementation of it as an option for any party that needs it.

TL;DR No, this won't prevent binding and connecting to another device. The option for interface binding is removed which won't affect the more common IP binding. Interface binding is a very niche feature which we decided to drop due to it rarely being needed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants