Skip to content

Cyphal/UDP: LinkLayerSniffer shall only accept frames from a specific NIC #314

@pavel-kirienko

Description

@pavel-kirienko

The UDP tracer reports invalid transfer-ID errors as follows:

2023-09-01 23:54:02 1930786 DEB pycyphal.transport.redundant._tracer: RedundantTracer({(<class 'pycyphal.transport.udp._udp.UDPTransport'>, 139945704416784): <pycyphal.transport.udp._tracer.UDPTracer object at 0x7f47a4899010>, (<class 'pycyphal.transport.udp._udp.UDPTransport'>, 139945717383696): <pycyphal.transport.udp._tracer.UDPTracer object at 0x7f47a71d3b90>}): Processing RedundantCapture(timestamp=Timestamp(system_ns=1693601642728726000, monotonic_ns=993420910877439), inferior=UDPCapture(timestamp=Timestamp(system_ns=1693601642728726000, monotonic_ns=993420910877439), link_layer_packet=LinkLayerPacket(protocol=2, source=01005e001d55, destination=00248c4216fd, payload=4500003fb5a040001011e647c0a801c8ef001d55952a24a6002bcf0201043f8fffff551d3e000000000000000000008000003bfa010000000000569e7bb9a4)), iface_id=139945717383696, transfer_id_modulo=18446744073709551616)
2023-09-01 23:54:02 1930786 DEB pycyphal.transport.redundant._tracer: RedundantTracer({(<class 'pycyphal.transport.udp._udp.UDPTransport'>, 139945704416784): <pycyphal.transport.udp._tracer.UDPTracer object at 0x7f47a4899010>, (<class 'pycyphal.transport.udp._udp.UDPTransport'>, 139945717383696): <pycyphal.transport.udp._tracer.UDPTracer object at 0x7f47a71d3b90>}): BYPASS: UDPErrorTrace(timestamp=Timestamp(system_ns=1693601642728726000, monotonic_ns=993420910877439), error=<Error.UNEXPECTED_TRANSFER_ID: 2>)

Same but with manual line breaks:

2023-09-01 23:54:02 1930786 DEB pycyphal.transport.redundant._tracer:
    RedundantTracer({(<class 'pycyphal.transport.udp._udp.UDPTransport'>, 139945704416784): <pycyphal.transport.udp._tracer.UDPTracer object at 0x7f47a4899010>, (<class 'pycyphal.transport.udp._udp.UDPTransport'>, 139945717383696): <pycyphal.transport.udp._tracer.UDPTracer object at 0x7f47a71d3b90>}):
        Processing RedundantCapture(
            timestamp=Timestamp(system_ns=1693601642728726000, monotonic_ns=993420910877439),
                inferior=UDPCapture(
                    timestamp=Timestamp(system_ns=1693601642728726000, monotonic_ns=993420910877439),
                    link_layer_packet=LinkLayerPacket(
                        protocol=2,
                        source=01005e001d55,
                        destination=00248c4216fd,
                        payload=4500003fb5a040001011e647c0a801c8ef001d55952a24a6002bcf0201043f8fffff551d3e000000000000000000008000003bfa010000000000569e7bb9a4
                    )
                ),
                iface_id=139945717383696,
                transfer_id_modulo=18446744073709551616)

2023-09-01 23:54:02 1930786 DEB pycyphal.transport.redundant._tracer:
    RedundantTracer({(<class 'pycyphal.transport.udp._udp.UDPTransport'>, 139945704416784):
        <pycyphal.transport.udp._tracer.UDPTracer object at 0x7f47a4899010>, (<class 'pycyphal.transport.udp._udp.UDPTransport'>, 139945717383696): <pycyphal.transport.udp._tracer.UDPTracer object at 0x7f47a71d3b90>}):
            BYPASS:
                UDPErrorTrace(
                    timestamp=Timestamp(system_ns=1693601642728726000,
                    monotonic_ns=993420910877439),
                    error=<Error.UNEXPECTED_TRANSFER_ID: 2>
                )

Reproducible with:

UAVCAN__UDP__IFACE="127.0.0.1 192.168.1.200" UAVCAN__NODE__ID=12345 y -vv mon 2>error.log

Not reproducible without interface redundancy.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions