OpenCyphal / libudpard

A compact implementation of the Cyphal/UDP protocol in C for high-integrity real-time embedded systems
MIT License
10 stars 8 forks source link

Add check to verify that the correct RX session transport index is updated in rxSessionUpdate #23

Closed lydia-at-amazon closed 11 months ago

lydia-at-amazon commented 1 year ago

While updating the out-of-order multiframe bug, another bug was found related to using redundant transports. We were updating the RX session for multiframe transfers without verifying that the transport index passed into udpardRxAccept matched the index saved for the RX session.

emrainey commented 1 year ago

Does this have both positive and negative tests? It's hard to tell in the diff.

lydia-at-amazon commented 1 year ago

Does this have both positive and negative tests? It's hard to tell in the diff.

By negative tests, do you mean where we check if the transport index does not equal the RX session transport index?

Here is the unit test for that: https://github.com/OpenCyphal-Garage/libudpard/blob/main/tests/test_private_rx.cpp#L492

thirtytwobits commented 11 months ago

This is outdated in the light of our new work on main2.