Skip to content

Commit 7f2fac1

Browse files
handle anonymous nodes
1 parent b962dd3 commit 7f2fac1

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

libcanard/canard.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1608,6 +1608,9 @@ static void node_id_occupancy_reset(canard_t* const self)
16081608
// Records the seen node-ID and reallocates the local node if a collision is found.
16091609
static void node_id_occupancy_update(canard_t* const self, const byte_t src)
16101610
{
1611+
if (src == CANARD_NODE_ID_ANONYMOUS) {
1612+
return;
1613+
}
16111614
// Update the node-ID occupancy bitmap. We cannot detect departures of an individual node, so in the presence of
16121615
// churn the slots will be eventually exhausted. We mitigate this by applying probabilistic purge once the
16131616
// population count exceeds some threshold, such that the purge probability becomes 1 when the bitmap is almost

0 commit comments

Comments
 (0)