Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 17 additions & 1 deletion source/scheduler_orchestra.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -729,6 +729,11 @@ export function on_tx(node, packet, status_ok)
{
const RPL_CODE_DAO = 0x02; /* Destination Advertisement Option */

if (node.config.RPL_WITH_DAO_ACK) {
/* wait for DAO ACK in this case */
return;
}

/* check if our parent just ACKed a DAO */
if (packet.packet_protocol === constants.PROTO_ICMP6
&& packet.msg_type === RPL_CODE_DAO
Expand All @@ -748,7 +753,18 @@ export function on_tx(node, packet, status_ok)

export function on_rx(node, packet)
{
/* nothing */
const RPL_CODE_DAO_ACK = 0x03; /* DAO acknowledgment */

if (packet.packet_protocol === constants.PROTO_ICMP6
&& packet.msg_type === RPL_CODE_DAO_ACK) {

if (node.orchestra_parent_linkaddr != null
&& addr_equal(packet.nexthop_addr, node.orchestra_parent_linkaddr)) {
/* yes! */
mlog(log.DEBUG, node, `parent sent a DAO ACK: parent definately knows us!`);
node.orchestra_parent_knows_us = true;
}
}
}

/* ------------------------------------------------- */
Expand Down