Skip to content

Commit 6b83d82

Browse files
author
Mika Tervonen
committed
Remove periodic PAN version increase from Wi-SUN border router
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
1 parent ef670e2 commit 6b83d82

File tree

3 files changed

+17
-9
lines changed

3 files changed

+17
-9
lines changed

CHANGELOG.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@
1313
* Optimized medium size network MPL parameters for 40 seconds multicast interval
1414
* Added traces to EAPOL TX failure
1515
* Added traces to Adaptation layer for Direct TX queue level decrease or increase by 20
16-
* New Network statitis info for Randon early detetction dropped packet at Adaptation layer.
16+
* New Network statistics info for Random early detection dropped packet at Adaptation layer.
17+
* Border router does not periodically increase the PAN version number for faster detection of Border router restart.
1718

1819
### Bugfix
1920
* Prevent sending broadcast frames on unicast channel

nanostack/ws_bbr_api.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,8 @@ int ws_bbr_start(int8_t interface_id, int8_t backbone_interface_id);
9696
#define BBR_GUA_ROUTE 0x0002 /**< More specific route is added for GUA prefix */
9797
#define BBR_BB_WAIT 0x0004 /**< Wait backbone availability before starting Wi-SUN network */
9898
#define BBR_DEFAULT_ROUTE 0x0008 /**< Add default route parameter to DIO */
99-
#define BBR_REQUIRE_DAO_REFRESH 0x0010 /**< Do not increment PAN version number when active forces DAO update from nodes*/
99+
#define BBR_REQUIRE_DAO_REFRESH 0x0000 /**< Deprecated DAO Refresh is now the default functionality*/
100+
#define BBR_PERIODIC_VERSION_INC 0x0010 /**< Increment PAN version number Periodically*/
100101
#define BBR_GUA_SLAAC 0x0020 /**< in Global prefix use SLAAC address generation to reduce traffic during bootstrap */
101102

102103
/**

source/6LoWPAN/ws/ws_bbr_api.c

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -712,11 +712,13 @@ void ws_bbr_pan_version_increase(protocol_interface_info_entry_t *cur)
712712
return;
713713
}
714714
tr_debug("Border router version number update");
715-
if (configuration & BBR_REQUIRE_DAO_REFRESH) {
715+
if (configuration & BBR_PERIODIC_VERSION_INC) {
716+
// Periodically increase the version number.
717+
// This removes need for DAO, but causes slowness in recovery
718+
pan_version_timer = cur->ws_info->cfg->timing.pan_timeout / PAN_VERSION_CHANGE_INTERVAL;
719+
} else {
716720
// Version number is not periodically increased forcing nodes to check Border router availability using DAO
717721
pan_version_timer = 0;
718-
} else {
719-
pan_version_timer = cur->ws_info->cfg->timing.pan_timeout / PAN_VERSION_CHANGE_INTERVAL;
720722
}
721723
cur->ws_info->pan_information.pan_version++;
722724
// Inconsistent for border router to make information distribute faster
@@ -923,12 +925,16 @@ int ws_bbr_configure(int8_t interface_id, uint16_t options)
923925

924926
protocol_interface_info_entry_t *cur = protocol_stack_interface_info_get_by_id(interface_id);
925927

926-
if (protocol_6lowpan_rpl_root_dodag &&
927-
options != configuration) {
928-
//Configuration changed delete previous setup
929-
ws_bbr_routing_stop(cur);
928+
if (options == configuration) {
929+
return 0;
930930
}
931+
//Configuration changed
931932
configuration = options;
933+
if (protocol_6lowpan_rpl_root_dodag) {
934+
// Already active needs to restart
935+
ws_bbr_routing_stop(cur);
936+
ws_bbr_pan_version_increase(cur);
937+
}
932938
return 0;
933939
#else
934940
(void)interface_id;

0 commit comments

Comments
 (0)