-
-
Notifications
You must be signed in to change notification settings - Fork 107
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Cyphal/UDP: LinkLayerSniffer shall only accept frames from a specific NIC #314
Comments
This issue affects only the capture mode, hence its severity is not high. Normal operation is not affected. The reason is that when a UDP transport instance is requested to commence capture, it launches a LinkLayerSniffer(filter_expression='udp and dst net 239.0.0.0/15', num_devices=3, num_devices_active=3) If there are N>1 instances, which is the case if redundant UDP interfaces are used, there will be N sniffers running in parallel, each configured to collect frames matching the BPF expression from all suitable network interfaces, causing each frame to be duplicated N times. The solution is to confine each instance of LinkLayerSniffer to its own interface only. This requires querying the networking stack for the mapping between a local iface address and its NIC name. This does not address the case when there is more than one address per local interface. ALSO: The BPF expression should filter on the destination port number as well:
|
Related setup log with two interfaces configured as shown above; observe the same LinkLayerSniffer being set up twice with identical parameters:
|
The UDP tracer reports invalid transfer-ID errors as follows:
Same but with manual line breaks:
Reproducible with:
Not reproducible without interface redundancy.
The text was updated successfully, but these errors were encountered: