Skip to content

Commit 6283dfd

Browse files
author
Juha Heiskanen
committed
DIO advertisment fix
Wi-sun bootsratap rules was broke DIO advertisment aat error case when RANK start goes worster. Change-Id: I776882bc5d5da7bb223825ed6a9236cfe7be9799
1 parent 1acec7c commit 6283dfd

File tree

1 file changed

+15
-11
lines changed

1 file changed

+15
-11
lines changed

source/RPL/rpl_upward.c

Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1833,17 +1833,21 @@ void rpl_upward_dio_timer(rpl_instance_t *instance, uint16_t ticks)
18331833
if (rpl_dodag_am_leaf(dodag) && !instance->poison_count) {
18341834
return;
18351835
}
1836-
// We dont have any valid address in interface
1837-
if (ns_list_count(&instance->dao_targets) == 0) {
1838-
return;
1839-
}
1840-
/* Address registrations for parent ongoing*/
1841-
if (rpl_policy_parent_confirmation_requested() && instance->pending_neighbour_confirmation) {
1842-
return;
1843-
}
1844-
/* If we are waiting for DAO or DAO registration is needed we dont send periodic DIOs */
1845-
if (instance->dao_in_transit || instance->delay_dao_timer > 0) {
1846-
return;
1836+
/* Delay sending first DIO if we are still potentially gathering info */
1837+
/* Important to always send DIOs if we ever have sent any, so we can indicate problems to others */
1838+
if (!instance->last_advertised_dodag_version && rpl_policy_parent_confirmation_requested()) {
1839+
// We dont have any valid address in interface
1840+
if (ns_list_count(&instance->dao_targets) == 0) {
1841+
return;
1842+
}
1843+
/* Address registrations for parent ongoing*/
1844+
if (instance->pending_neighbour_confirmation) {
1845+
return;
1846+
}
1847+
/* If we are waiting for DAO or DAO registration is needed we dont send periodic DIOs */
1848+
if (instance->dao_in_transit || instance->delay_dao_timer > 0) {
1849+
return;
1850+
}
18471851
}
18481852
if (trickle_timer(&instance->dio_timer, &dodag->dio_timer_params, ticks)) {
18491853
instance->dio_not_consistent = false;

0 commit comments

Comments
 (0)