{"url":"https://api.github.com/repos/OpenCyphal/libudpard/pulls/76","id":3979887776,"node_id":"PR_kwDOHxjDPs7tOESg","html_url":"https://github.com/OpenCyphal/libudpard/pull/76","diff_url":"https://github.com/OpenCyphal/libudpard/pull/76.diff","patch_url":"https://github.com/OpenCyphal/libudpard/pull/76.patch","issue_url":"https://api.github.com/repos/OpenCyphal/libudpard/issues/76","number":76,"state":"closed","locked":false,"title":"Add runtime-available interface bitmap; behavioral-correctness fixes","user":{"login":"pavel-kirienko","id":3298404,"node_id":"MDQ6VXNlcjMyOTg0MDQ=","avatar_url":"https://avatars.githubusercontent.com/u/3298404?v=4","gravatar_id":"","url":"https://api.github.com/users/pavel-kirienko","html_url":"https://github.com/pavel-kirienko","followers_url":"https://api.github.com/users/pavel-kirienko/followers","following_url":"https://api.github.com/users/pavel-kirienko/following{/other_user}","gists_url":"https://api.github.com/users/pavel-kirienko/gists{/gist_id}","starred_url":"https://api.github.com/users/pavel-kirienko/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pavel-kirienko/subscriptions","organizations_url":"https://api.github.com/users/pavel-kirienko/orgs","repos_url":"https://api.github.com/users/pavel-kirienko/repos","events_url":"https://api.github.com/users/pavel-kirienko/events{/privacy}","received_events_url":"https://api.github.com/users/pavel-kirienko/received_events","type":"User","user_view_type":"public","site_admin":false},"body":"## 1. Runtime-available interface bitmap (breaking API change)\n\n`udpard_tx_t` gains `iface_bitmap` — a runtime-mutable subset of `UDPARD_IFACE_BITMAP_ALL` naming the interfaces that exist locally — and `udpard_tx_new()` gains a matching parameter. Every push intersects the requested iface set with it, so transfer replicas are no longer enqueued for interfaces the application cannot drain (previously they sat queued until they expired). Passing `UDPARD_IFACE_BITMAP_ALL` is now correct regardless of interface count; `0` means listen-only. Init rejects a bitmap with bits beyond `UDPARD_IFACE_BITMAP_ALL`.\n\nTests: `test_tx_iface_available_mask`, `test_tx_listen_only`, `test_tx_iface_bitmap_extra_bits`, plus init-validation cases; all 22 `udpard_tx_new` call sites updated.\n\n## 2. Behavioral-correctness fixes (review findings)\n\n| Area | Fix |\n|------|-----|\n| TX use-after-free | `udpard_tx_free()` asserts `enqueued_frames_count == 0`; datagram refs from `udpard_tx_refcount_inc()` must be released first. |\n| RX use-after-free | `rx_session_eject()` destroys the reassembly slot **before** `on_message()`, so a re-entrant push cannot free the in-flight slot. |\n| Queue accounting | `tx_queue_vacancy()` guards the `limit - count` subtraction against underflow when the limit is lowered below the in-flight count. |\n| NULL robustness | `udpard_rx_poll()` gains a `self != NULL` guard. |\n| Misc | `header_serialize()` uses `UDPARD_ASSERT()`; doc fixes (head-only payload validation, inverted `now`/`deadline`). |\n\nRegression tests: `test_rx_reentrant_push_in_callback`, `test_tx_queue_limit_lowered_below_count`, `udpard_rx_poll(NULL, …)` guard.\n\n## Verification\n\nFull suite green across x32/x64 × C99/C11 (Debug, assertions on); static-analysis (clang-tidy, warnings-as-errors) and `clang-format` clean.\n\n> [!WARNING]\n> **Breaking:** `udpard_tx_new()` takes a new `iface_bitmap` argument, and `udpard_tx_free()` now requires all `udpard_tx_refcount_inc()` datagram references to be released before the pipeline is discarded.\n\n🤖 Generated with [Claude Code](https://claude.com/claude-code)\n","created_at":"2026-07-02T16:28:20Z","updated_at":"2026-07-02T21:21:05Z","closed_at":"2026-07-02T21:21:03Z","merged_at":"2026-07-02T21:21:03Z","merge_commit_sha":"e4f8857d0e8f18dd290f9bb546d7faf6b7b9ce61","assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"draft":false,"commits_url":"https://api.github.com/repos/OpenCyphal/libudpard/pulls/76/commits","review_comments_url":"https://api.github.com/repos/OpenCyphal/libudpard/pulls/76/comments","review_comment_url":"https://api.github.com/repos/OpenCyphal/libudpard/pulls/comments{/number}","comments_url":"https://api.github.com/repos/OpenCyphal/libudpard/issues/76/comments","statuses_url":"https://api.github.com/repos/OpenCyphal/libudpard/statuses/f2ecb07dea5cab7d5d8d879b62cf0d3143b80dbb","head":{"label":"OpenCyphal:fix/behavioral-review-findings","ref":"fix/behavioral-review-findings","sha":"f2ecb07dea5cab7d5d8d879b62cf0d3143b80dbb","user":{"login":"OpenCyphal","id":10167381,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEwMTY3Mzgx","avatar_url":"https://avatars.githubusercontent.com/u/10167381?v=4","gravatar_id":"","url":"https://api.github.com/users/OpenCyphal","html_url":"https://github.com/OpenCyphal","followers_url":"https://api.github.com/users/OpenCyphal/followers","following_url":"https://api.github.com/users/OpenCyphal/following{/other_user}","gists_url":"https://api.github.com/users/OpenCyphal/gists{/gist_id}","starred_url":"https://api.github.com/users/OpenCyphal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/OpenCyphal/subscriptions","organizations_url":"https://api.github.com/users/OpenCyphal/orgs","repos_url":"https://api.github.com/users/OpenCyphal/repos","events_url":"https://api.github.com/users/OpenCyphal/events{/privacy}","received_events_url":"https://api.github.com/users/OpenCyphal/received_events","type":"Organization","user_view_type":"public","site_admin":false},"repo":{"id":521716542,"node_id":"R_kgDOHxjDPg","name":"libudpard","full_name":"OpenCyphal/libudpard","private":false,"owner":{"login":"OpenCyphal","id":10167381,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEwMTY3Mzgx","avatar_url":"https://avatars.githubusercontent.com/u/10167381?v=4","gravatar_id":"","url":"https://api.github.com/users/OpenCyphal","html_url":"https://github.com/OpenCyphal","followers_url":"https://api.github.com/users/OpenCyphal/followers","following_url":"https://api.github.com/users/OpenCyphal/following{/other_user}","gists_url":"https://api.github.com/users/OpenCyphal/gists{/gist_id}","starred_url":"https://api.github.com/users/OpenCyphal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/OpenCyphal/subscriptions","organizations_url":"https://api.github.com/users/OpenCyphal/orgs","repos_url":"https://api.github.com/users/OpenCyphal/repos","events_url":"https://api.github.com/users/OpenCyphal/events{/privacy}","received_events_url":"https://api.github.com/users/OpenCyphal/received_events","type":"Organization","user_view_type":"public","site_admin":false},"html_url":"https://github.com/OpenCyphal/libudpard","description":"A compact implementation of the Cyphal/UDP protocol in C for high-integrity real-time embedded systems ","fork":false,"url":"https://api.github.com/repos/OpenCyphal/libudpard","forks_url":"https://api.github.com/repos/OpenCyphal/libudpard/forks","keys_url":"https://api.github.com/repos/OpenCyphal/libudpard/keys{/key_id}","collaborators_url":"https://api.github.com/repos/OpenCyphal/libudpard/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/OpenCyphal/libudpard/teams","hooks_url":"https://api.github.com/repos/OpenCyphal/libudpard/hooks","issue_events_url":"https://api.github.com/repos/OpenCyphal/libudpard/issues/events{/number}","events_url":"https://api.github.com/repos/OpenCyphal/libudpard/events","assignees_url":"https://api.github.com/repos/OpenCyphal/libudpard/assignees{/user}","branches_url":"https://api.github.com/repos/OpenCyphal/libudpard/branches{/branch}","tags_url":"https://api.github.com/repos/OpenCyphal/libudpard/tags","blobs_url":"https://api.github.com/repos/OpenCyphal/libudpard/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/OpenCyphal/libudpard/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/OpenCyphal/libudpard/git/refs{/sha}","trees_url":"https://api.github.com/repos/OpenCyphal/libudpard/git/trees{/sha}","statuses_url":"https://api.github.com/repos/OpenCyphal/libudpard/statuses/{sha}","languages_url":"https://api.github.com/repos/OpenCyphal/libudpard/languages","stargazers_url":"https://api.github.com/repos/OpenCyphal/libudpard/stargazers","contributors_url":"https://api.github.com/repos/OpenCyphal/libudpard/contributors","subscribers_url":"https://api.github.com/repos/OpenCyphal/libudpard/subscribers","subscription_url":"https://api.github.com/repos/OpenCyphal/libudpard/subscription","commits_url":"https://api.github.com/repos/OpenCyphal/libudpard/commits{/sha}","git_commits_url":"https://api.github.com/repos/OpenCyphal/libudpard/git/commits{/sha}","comments_url":"https://api.github.com/repos/OpenCyphal/libudpard/comments{/number}","issue_comment_url":"https://api.github.com/repos/OpenCyphal/libudpard/issues/comments{/number}","contents_url":"https://api.github.com/repos/OpenCyphal/libudpard/contents/{+path}","compare_url":"https://api.github.com/repos/OpenCyphal/libudpard/compare/{base}...{head}","merges_url":"https://api.github.com/repos/OpenCyphal/libudpard/merges","archive_url":"https://api.github.com/repos/OpenCyphal/libudpard/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/OpenCyphal/libudpard/downloads","issues_url":"https://api.github.com/repos/OpenCyphal/libudpard/issues{/number}","pulls_url":"https://api.github.com/repos/OpenCyphal/libudpard/pulls{/number}","milestones_url":"https://api.github.com/repos/OpenCyphal/libudpard/milestones{/number}","notifications_url":"https://api.github.com/repos/OpenCyphal/libudpard/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/OpenCyphal/libudpard/labels{/name}","releases_url":"https://api.github.com/repos/OpenCyphal/libudpard/releases{/id}","deployments_url":"https://api.github.com/repos/OpenCyphal/libudpard/deployments","created_at":"2022-08-05T17:03:43Z","updated_at":"2026-07-02T21:21:08Z","pushed_at":"2026-07-02T21:21:05Z","git_url":"git://github.com/OpenCyphal/libudpard.git","ssh_url":"git@github.com:OpenCyphal/libudpard.git","clone_url":"https://github.com/OpenCyphal/libudpard.git","svn_url":"https://github.com/OpenCyphal/libudpard","homepage":"","size":451,"stargazers_count":23,"watchers_count":23,"language":"C","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"has_discussions":false,"forks_count":12,"mirror_url":null,"archived":false,"disabled":false,"open_issues_count":1,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"allow_forking":true,"is_template":false,"web_commit_signoff_required":false,"has_pull_requests":true,"pull_request_creation_policy":"all","topics":[],"visibility":"public","forks":12,"open_issues":1,"watchers":23,"default_branch":"main"}},"base":{"label":"OpenCyphal:main","ref":"main","sha":"b9aed881ed6cf123ff34bea5e11dc77907169f31","user":{"login":"OpenCyphal","id":10167381,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEwMTY3Mzgx","avatar_url":"https://avatars.githubusercontent.com/u/10167381?v=4","gravatar_id":"","url":"https://api.github.com/users/OpenCyphal","html_url":"https://github.com/OpenCyphal","followers_url":"https://api.github.com/users/OpenCyphal/followers","following_url":"https://api.github.com/users/OpenCyphal/following{/other_user}","gists_url":"https://api.github.com/users/OpenCyphal/gists{/gist_id}","starred_url":"https://api.github.com/users/OpenCyphal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/OpenCyphal/subscriptions","organizations_url":"https://api.github.com/users/OpenCyphal/orgs","repos_url":"https://api.github.com/users/OpenCyphal/repos","events_url":"https://api.github.com/users/OpenCyphal/events{/privacy}","received_events_url":"https://api.github.com/users/OpenCyphal/received_events","type":"Organization","user_view_type":"public","site_admin":false},"repo":{"id":521716542,"node_id":"R_kgDOHxjDPg","name":"libudpard","full_name":"OpenCyphal/libudpard","private":false,"owner":{"login":"OpenCyphal","id":10167381,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEwMTY3Mzgx","avatar_url":"https://avatars.githubusercontent.com/u/10167381?v=4","gravatar_id":"","url":"https://api.github.com/users/OpenCyphal","html_url":"https://github.com/OpenCyphal","followers_url":"https://api.github.com/users/OpenCyphal/followers","following_url":"https://api.github.com/users/OpenCyphal/following{/other_user}","gists_url":"https://api.github.com/users/OpenCyphal/gists{/gist_id}","starred_url":"https://api.github.com/users/OpenCyphal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/OpenCyphal/subscriptions","organizations_url":"https://api.github.com/users/OpenCyphal/orgs","repos_url":"https://api.github.com/users/OpenCyphal/repos","events_url":"https://api.github.com/users/OpenCyphal/events{/privacy}","received_events_url":"https://api.github.com/users/OpenCyphal/received_events","type":"Organization","user_view_type":"public","site_admin":false},"html_url":"https://github.com/OpenCyphal/libudpard","description":"A compact implementation of the Cyphal/UDP protocol in C for high-integrity real-time embedded systems ","fork":false,"url":"https://api.github.com/repos/OpenCyphal/libudpard","forks_url":"https://api.github.com/repos/OpenCyphal/libudpard/forks","keys_url":"https://api.github.com/repos/OpenCyphal/libudpard/keys{/key_id}","collaborators_url":"https://api.github.com/repos/OpenCyphal/libudpard/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/OpenCyphal/libudpard/teams","hooks_url":"https://api.github.com/repos/OpenCyphal/libudpard/hooks","issue_events_url":"https://api.github.com/repos/OpenCyphal/libudpard/issues/events{/number}","events_url":"https://api.github.com/repos/OpenCyphal/libudpard/events","assignees_url":"https://api.github.com/repos/OpenCyphal/libudpard/assignees{/user}","branches_url":"https://api.github.com/repos/OpenCyphal/libudpard/branches{/branch}","tags_url":"https://api.github.com/repos/OpenCyphal/libudpard/tags","blobs_url":"https://api.github.com/repos/OpenCyphal/libudpard/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/OpenCyphal/libudpard/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/OpenCyphal/libudpard/git/refs{/sha}","trees_url":"https://api.github.com/repos/OpenCyphal/libudpard/git/trees{/sha}","statuses_url":"https://api.github.com/repos/OpenCyphal/libudpard/statuses/{sha}","languages_url":"https://api.github.com/repos/OpenCyphal/libudpard/languages","stargazers_url":"https://api.github.com/repos/OpenCyphal/libudpard/stargazers","contributors_url":"https://api.github.com/repos/OpenCyphal/libudpard/contributors","subscribers_url":"https://api.github.com/repos/OpenCyphal/libudpard/subscribers","subscription_url":"https://api.github.com/repos/OpenCyphal/libudpard/subscription","commits_url":"https://api.github.com/repos/OpenCyphal/libudpard/commits{/sha}","git_commits_url":"https://api.github.com/repos/OpenCyphal/libudpard/git/commits{/sha}","comments_url":"https://api.github.com/repos/OpenCyphal/libudpard/comments{/number}","issue_comment_url":"https://api.github.com/repos/OpenCyphal/libudpard/issues/comments{/number}","contents_url":"https://api.github.com/repos/OpenCyphal/libudpard/contents/{+path}","compare_url":"https://api.github.com/repos/OpenCyphal/libudpard/compare/{base}...{head}","merges_url":"https://api.github.com/repos/OpenCyphal/libudpard/merges","archive_url":"https://api.github.com/repos/OpenCyphal/libudpard/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/OpenCyphal/libudpard/downloads","issues_url":"https://api.github.com/repos/OpenCyphal/libudpard/issues{/number}","pulls_url":"https://api.github.com/repos/OpenCyphal/libudpard/pulls{/number}","milestones_url":"https://api.github.com/repos/OpenCyphal/libudpard/milestones{/number}","notifications_url":"https://api.github.com/repos/OpenCyphal/libudpard/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/OpenCyphal/libudpard/labels{/name}","releases_url":"https://api.github.com/repos/OpenCyphal/libudpard/releases{/id}","deployments_url":"https://api.github.com/repos/OpenCyphal/libudpard/deployments","created_at":"2022-08-05T17:03:43Z","updated_at":"2026-07-02T21:21:08Z","pushed_at":"2026-07-02T21:21:05Z","git_url":"git://github.com/OpenCyphal/libudpard.git","ssh_url":"git@github.com:OpenCyphal/libudpard.git","clone_url":"https://github.com/OpenCyphal/libudpard.git","svn_url":"https://github.com/OpenCyphal/libudpard","homepage":"","size":451,"stargazers_count":23,"watchers_count":23,"language":"C","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"has_discussions":false,"forks_count":12,"mirror_url":null,"archived":false,"disabled":false,"open_issues_count":1,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"allow_forking":true,"is_template":false,"web_commit_signoff_required":false,"has_pull_requests":true,"pull_request_creation_policy":"all","topics":[],"visibility":"public","forks":12,"open_issues":1,"watchers":23,"default_branch":"main"}},"_links":{"self":{"href":"https://api.github.com/repos/OpenCyphal/libudpard/pulls/76"},"html":{"href":"https://github.com/OpenCyphal/libudpard/pull/76"},"issue":{"href":"https://api.github.com/repos/OpenCyphal/libudpard/issues/76"},"comments":{"href":"https://api.github.com/repos/OpenCyphal/libudpard/issues/76/comments"},"review_comments":{"href":"https://api.github.com/repos/OpenCyphal/libudpard/pulls/76/comments"},"review_comment":{"href":"https://api.github.com/repos/OpenCyphal/libudpard/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/OpenCyphal/libudpard/pulls/76/commits"},"statuses":{"href":"https://api.github.com/repos/OpenCyphal/libudpard/statuses/f2ecb07dea5cab7d5d8d879b62cf0d3143b80dbb"}},"author_association":"MEMBER","auto_merge":null,"assignee":null,"active_lock_reason":null,"merged":true,"mergeable":null,"rebaseable":null,"mergeable_state":"unknown","merged_by":{"login":"pavel-kirienko","id":3298404,"node_id":"MDQ6VXNlcjMyOTg0MDQ=","avatar_url":"https://avatars.githubusercontent.com/u/3298404?v=4","gravatar_id":"","url":"https://api.github.com/users/pavel-kirienko","html_url":"https://github.com/pavel-kirienko","followers_url":"https://api.github.com/users/pavel-kirienko/followers","following_url":"https://api.github.com/users/pavel-kirienko/following{/other_user}","gists_url":"https://api.github.com/users/pavel-kirienko/gists{/gist_id}","starred_url":"https://api.github.com/users/pavel-kirienko/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pavel-kirienko/subscriptions","organizations_url":"https://api.github.com/users/pavel-kirienko/orgs","repos_url":"https://api.github.com/users/pavel-kirienko/repos","events_url":"https://api.github.com/users/pavel-kirienko/events{/privacy}","received_events_url":"https://api.github.com/users/pavel-kirienko/received_events","type":"User","user_view_type":"public","site_admin":false},"comments":0,"review_comments":0,"maintainer_can_modify":false,"commits":2,"additions":368,"deletions":54,"changed_files":11}