Skip to content

Commit

Permalink
Wi-SUN border router starts faster in static configuration
Browse files Browse the repository at this point in the history
If backbone is started in static mode we dont wait for the extra 4
minutes if we have been put to dynamic environment

When we dont have backbone available at all we will start the Wi-SUN
with ULA prefix after 5 minutes
  • Loading branch information
Mika Tervonen authored and Mika Tervonen committed Feb 19, 2021
1 parent 2f427e1 commit b9c0b7d
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions source/6LoWPAN/ws/ws_bbr_api.c
Expand Up @@ -665,9 +665,16 @@ static void ws_bbr_rpl_status_check(protocol_interface_info_entry_t *cur)
*/
if ((configuration & BBR_ULA_C) == 0 && memcmp(global_prefix, ADDR_UNSPECIFIED, 8) == 0) {
//Global prefix not available count if backup ULA should be created
uint32_t prefix_wait_time = BBR_BACKUP_ULA_DELAY;
global_prefix_unavailable_timer += BBR_CHECK_INTERVAL;
tr_debug("Check for backup prefix %"PRIu32"", global_prefix_unavailable_timer);
if (global_prefix_unavailable_timer >= BBR_BACKUP_ULA_DELAY) {

if (NULL != ws_bbr_bb_static_prefix_get(NULL)) {
// If we have a static configuration we activate it faster.
prefix_wait_time = 40;
}

tr_debug("Check for backup prefix %"PRIu32" / %"PRIu32"", prefix_wait_time, global_prefix_unavailable_timer);
if (global_prefix_unavailable_timer >= prefix_wait_time) {
if (memcmp(current_global_prefix, ADDR_UNSPECIFIED, 8) == 0) {
tr_info("start using backup prefix %s", trace_ipv6_prefix(local_prefix, 64));
}
Expand Down

0 comments on commit b9c0b7d

Please sign in to comment.