Skip to content

Commit

Permalink
Remove periodic PAN version increase from Wi-SUN border router
Browse files Browse the repository at this point in the history
Deprecate the REQUIRE_DAO_REFRESH and make it the default functionality
Add test feature for PERIODIC_VERSION_INC that can be used to periodically
increate the PAN version number to prevent DAO messages

Modified Configure function so that calling it will re initialise
PAN version increase
  • Loading branch information
Mika Tervonen committed Dec 9, 2020
1 parent ef670e2 commit 6b83d82
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 9 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@
* Optimized medium size network MPL parameters for 40 seconds multicast interval
* Added traces to EAPOL TX failure
* Added traces to Adaptation layer for Direct TX queue level decrease or increase by 20
* New Network statitis info for Randon early detetction dropped packet at Adaptation layer.
* New Network statistics info for Random early detection dropped packet at Adaptation layer.
* Border router does not periodically increase the PAN version number for faster detection of Border router restart.

### Bugfix
* Prevent sending broadcast frames on unicast channel
Expand Down
3 changes: 2 additions & 1 deletion nanostack/ws_bbr_api.h
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,8 @@ int ws_bbr_start(int8_t interface_id, int8_t backbone_interface_id);
#define BBR_GUA_ROUTE 0x0002 /**< More specific route is added for GUA prefix */
#define BBR_BB_WAIT 0x0004 /**< Wait backbone availability before starting Wi-SUN network */
#define BBR_DEFAULT_ROUTE 0x0008 /**< Add default route parameter to DIO */
#define BBR_REQUIRE_DAO_REFRESH 0x0010 /**< Do not increment PAN version number when active forces DAO update from nodes*/
#define BBR_REQUIRE_DAO_REFRESH 0x0000 /**< Deprecated DAO Refresh is now the default functionality*/
#define BBR_PERIODIC_VERSION_INC 0x0010 /**< Increment PAN version number Periodically*/
#define BBR_GUA_SLAAC 0x0020 /**< in Global prefix use SLAAC address generation to reduce traffic during bootstrap */

/**
Expand Down
20 changes: 13 additions & 7 deletions source/6LoWPAN/ws/ws_bbr_api.c
Original file line number Diff line number Diff line change
Expand Up @@ -712,11 +712,13 @@ void ws_bbr_pan_version_increase(protocol_interface_info_entry_t *cur)
return;
}
tr_debug("Border router version number update");
if (configuration & BBR_REQUIRE_DAO_REFRESH) {
if (configuration & BBR_PERIODIC_VERSION_INC) {
// Periodically increase the version number.
// This removes need for DAO, but causes slowness in recovery
pan_version_timer = cur->ws_info->cfg->timing.pan_timeout / PAN_VERSION_CHANGE_INTERVAL;
} else {
// Version number is not periodically increased forcing nodes to check Border router availability using DAO
pan_version_timer = 0;
} else {
pan_version_timer = cur->ws_info->cfg->timing.pan_timeout / PAN_VERSION_CHANGE_INTERVAL;
}
cur->ws_info->pan_information.pan_version++;
// Inconsistent for border router to make information distribute faster
Expand Down Expand Up @@ -923,12 +925,16 @@ int ws_bbr_configure(int8_t interface_id, uint16_t options)

protocol_interface_info_entry_t *cur = protocol_stack_interface_info_get_by_id(interface_id);

if (protocol_6lowpan_rpl_root_dodag &&
options != configuration) {
//Configuration changed delete previous setup
ws_bbr_routing_stop(cur);
if (options == configuration) {
return 0;
}
//Configuration changed
configuration = options;
if (protocol_6lowpan_rpl_root_dodag) {
// Already active needs to restart
ws_bbr_routing_stop(cur);
ws_bbr_pan_version_increase(cur);
}
return 0;
#else
(void)interface_id;
Expand Down

0 comments on commit 6b83d82

Please sign in to comment.