• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

OpenCyphal / libcanard
100%

Build:
DEFAULT BRANCH: master
Repo Added 24 Mar 2026 02:11PM UTC
Files 1
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

LAST BUILD ON BRANCH master
branch: master
CHANGE BRANCH
x
Reset
  • master
  • experimental
  • experimental-subscription
  • fix/rx-behavioral-correctness
  • pavel-kirienko-patch-1

02 Jul 2026 09:13PM UTC coverage: 100.0%. Remained the same
28621970011

push

github

web-flow
Fix RX behavioral defects: reassembly asserts, filter config, callback re-entrancy (#260)

## Summary

v5 TX/RX hardening in two parts. Every fix ships with a regression test
that fails on the pre-fix code and passes after.

### RX behavioral fixes (`canard.c`)

- `rx_subscribe`: accumulate `filters_dirty` (`||`) — a duplicate
subscribe no longer cancels a pending acceptance-filter reconfiguration
(was silent RX loss on filter-capable nodes).
- `rx_session_accept` / `rx_session_complete_slot`: drop the false
`slot->iface_index == ses->iface_index` assert that aborted on valid
redundant-interface traffic (per-slot affinity is still enforced at
admission).
- `rx_parse` (v0 anonymous): route on the 2 low data-type-ID bits per
the DroneCAN spec (the upper bits are a random discriminator), with a
weak HW acceptance filter for v0 DTID ≤ 3 — still one filter entry per
subscription.
- `rx_session_update`: dispatch `on_message` last, so a callback that
unsubscribes itself can't cause a use-after-free.
- `canard_new`: set `filters_dirty = filter_count > 0` so forced
Heartbeat/NodeStatus occupancy filters program even before the first
subscription.
- Forced-filter dedup: replace the alias-prone single-frame probe with a
filter-coverage (subset) test `rx_filter_covered`.

### Available-interfaces bitmap (intentional `canard_new` API break)

`canard_new()` gains an `iface_bitmap` of the interfaces available on
the node, ANDed into every enqueue at the single TX chokepoint
(`tx_push`). Requests/responses and all-publishes no longer queue frames
for interfaces that can't be drained. A **zero** bitmap declares a
**listen-only** node (TX is a clean no-op). Bits beyond
`CANARD_IFACE_COUNT` are rejected. Call sites, the demo, and the README
example are updated.

## Verification

Full suite green in the Debug build (assertions on); `clang-tidy` +
`cppcheck` + `clang-format` clean. Each fix was confirmed to be a real
guard by reverting its hunk and watching the test fail ... (continued)

218 of 218 branches covered (100.0%)

Branch coverage included in aggregate %.

31 of 31 new or added lines in 1 file covered. (100.0%)

880 of 880 relevant lines covered (100.0%)

14657.51 hits per line

Relevant lines Covered
Build:
Build:
880 RELEVANT LINES 880 COVERED LINES
14657.51 HITS PER LINE
Source Files on master
  • Tree
  • List 1
  • Changed 1
  • Source Changed 1
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses

Recent builds

Builds Branch Commit Type Ran Committer Via Coverage
28621970011 master Fix RX behavioral defects: reassembly asserts, filter config, callback re-entrancy (#260) ## Summary v5 TX/RX hardening in two parts. Every fix ships with a regression test that fails on the pre-fix code and passes after. ### RX behavioral fixe... push 02 Jul 2026 09:15PM UTC web-flow github
100.0
27090713836 master Update the v5 version description (#259) push 07 Jun 2026 11:07AM UTC web-flow github
100.0
24084737481 master v5.0 alpha (#258) v5 is a major rework based on the experience gained from extensive production use of the previous revisions. The API has been redesigned from scratch and as such there is no migration guide available; please refer to the example... push 07 Apr 2026 01:48PM UTC web-flow github
100.0
See All Builds (22)
  • Repo on GitHub
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc