Skip to content

Commit

Permalink
Bug Fix: Accept only next possible BSI for detect BR reboot and drop …
Browse files Browse the repository at this point in the history
…unkown's.
  • Loading branch information
Juha Heiuskanen committed Nov 23, 2020
1 parent 58f0e56 commit ac1025e
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
### Bugfix
* Prevent sending broadcast frames on unicast channel
* Delay sending of the first DIO message until parent selection is made and DAO target is published. Fix is made to avoid sending of DIO messages to the unstable network.
* Accept only next possible BSI for detect BR reboot. This fix a bug when PAN timeout happen and node join correctly to new but hear old BSI after that.


## Release v12.6.2 (09-11-2020)
Expand Down
13 changes: 9 additions & 4 deletions source/6LoWPAN/ws/ws_bootstrap.c
Original file line number Diff line number Diff line change
Expand Up @@ -1624,10 +1624,15 @@ static void ws_bootstrap_pan_config_analyse(struct protocol_interface_info_entry

//When Config is learned and USE Parent BS is enabled compare is this new BSI
if (cur->ws_info->configuration_learned && cur->ws_info->pan_information.use_parent_bs && ws_bs_ie.broadcast_schedule_identifier != cur->ws_info->hopping_schdule.fhss_bsi) {
tr_debug("NEW Brodcast Schedule %u...BR rebooted", ws_bs_ie.broadcast_schedule_identifier);
cur->ws_info->ws_bsi_block.block_time = cur->ws_info->cfg->timing.pan_timeout;
cur->ws_info->ws_bsi_block.old_bsi = cur->ws_info->hopping_schdule.fhss_bsi;
ws_bootstrap_event_discovery_start(cur);
//Accept only next possible BSI number
if ((cur->ws_info->hopping_schdule.fhss_bsi + 1) != ws_bs_ie.broadcast_schedule_identifier) {
tr_debug("Do not accept a unknown BSI: %u", ws_bs_ie.broadcast_schedule_identifier);
} else {
tr_debug("NEW Brodcast Schedule %u...BR rebooted", ws_bs_ie.broadcast_schedule_identifier);
cur->ws_info->ws_bsi_block.block_time = cur->ws_info->cfg->timing.pan_timeout;
cur->ws_info->ws_bsi_block.old_bsi = cur->ws_info->hopping_schdule.fhss_bsi;
ws_bootstrap_event_discovery_start(cur);
}
return;
}
}
Expand Down

0 comments on commit ac1025e

Please sign in to comment.