vsomeip icon indicating copy to clipboard operation
vsomeip copied to clipboard

Remove bind-to-device support where unavailable

Open EriComic opened this issue 1 year ago • 2 comments

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 [email protected] @danielfr-haleytek

EriComic avatar Oct 03 '24 12:10 EriComic

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

duartenfonseca avatar Oct 08 '24 12:10 duartenfonseca

@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.

EriComic avatar Oct 08 '24 14:10 EriComic