@@ -1663,11 +1663,16 @@ static bool ws_neighbor_entry_nud_notify(mac_neighbor_table_entry_t *entry_ptr,
1663
1663
activate_nud = true;
1664
1664
} else {
1665
1665
1666
+ if (cur -> ws_info -> ns_probed_timer > 7 ) {
1667
+ return false;//Accept 1 probe start / every seconds call
1668
+ }
1669
+
1666
1670
ws_bootsrap_create_ll_address (ll_address , entry_ptr -> mac64 );
1667
1671
if (!rpl_control_probe_parent_candidate (cur , ll_address )) {
1668
1672
return false;
1669
1673
}
1670
1674
1675
+
1671
1676
uint32_t probe_period = WS_PROBE_INIT_BASE_SECONDS << etx_entry -> etx_samples ;
1672
1677
uint32_t time_block = 1 << etx_entry -> etx_samples ;
1673
1678
if (time_from_start >= probe_period ) {
@@ -1697,7 +1702,14 @@ static bool ws_neighbor_entry_nud_notify(mac_neighbor_table_entry_t *entry_ptr,
1697
1702
ws_neighbor -> accelerated_etx_probe = false;
1698
1703
entry -> timer = 1 ;
1699
1704
}
1705
+
1700
1706
entry -> nud_process = nud_proces ;
1707
+ if (!nud_proces ) {
1708
+ cur -> ws_info -> ns_probed_timer += 8 ;
1709
+ if (cur -> ws_info -> ns_probed_timer > 32 ) {
1710
+ cur -> ws_info -> ns_probed_timer = 32 ;
1711
+ }
1712
+ }
1701
1713
1702
1714
return true;
1703
1715
}
@@ -2141,6 +2153,11 @@ static bool ws_rpl_new_parent_callback(uint8_t *ll_parent_address, void *handle,
2141
2153
return false;
2142
2154
}
2143
2155
2156
+ if (cur -> ws_info -> ns_probed_timer > 8 ) {
2157
+ //2 probe have been done so Try to avoid put more before accept new one's
2158
+ return false;
2159
+ }
2160
+
2144
2161
if (blacklist_reject (ll_parent_address )) {
2145
2162
// Rejected by blacklist
2146
2163
return false;
@@ -2158,6 +2175,7 @@ static bool ws_rpl_new_parent_callback(uint8_t *ll_parent_address, void *handle,
2158
2175
2159
2176
ws_bootstrap_neighbor_info_request (cur , mac64 , & neigh_buffer , false);
2160
2177
2178
+
2161
2179
if (rpl_control_candidate_list_size (cur , instance ) < cur -> ws_info -> rpl_parent_candidate_max ) {
2162
2180
//Not reach max value yet accept then all go to create neigh table
2163
2181
goto neigh_create ;
@@ -2637,6 +2655,7 @@ static void ws_bootstrap_event_handler(arm_event_s *event)
2637
2655
cur -> ws_info -> trickle_pc_running = false;
2638
2656
cur -> ws_info -> trickle_pas_running = false;
2639
2657
cur -> ws_info -> trickle_pcs_running = false;
2658
+ cur -> ws_info -> ns_probed_timer = 0 ;
2640
2659
2641
2660
if (cur -> bootsrap_mode == ARM_NWK_BOOTSRAP_MODE_6LoWPAN_BORDER_ROUTER ) {
2642
2661
tr_info ("Border router start network" );
@@ -2953,6 +2972,15 @@ void ws_bootstrap_seconds_timer(protocol_interface_info_entry_t *cur, uint32_t s
2953
2972
ws_bootstrap_event_discovery_start (cur );
2954
2973
}
2955
2974
}
2975
+
2976
+ //Probe limiter timer
2977
+ if (cur -> ws_info -> ns_probed_timer ) {
2978
+ if (cur -> ws_info -> ns_probed_timer > seconds ) {
2979
+ cur -> ws_info -> ns_probed_timer -= seconds ;
2980
+ } else {
2981
+ cur -> ws_info -> ns_probed_timer = 0 ;
2982
+ }
2983
+ }
2956
2984
}
2957
2985
2958
2986
void ws_primary_parent_update (protocol_interface_info_entry_t * interface , mac_neighbor_table_entry_t * neighbor )
0 commit comments