Skip to content

Commit 81740b8

Browse files
author
Juha Heiskanen
committed
Wi-sun bootstarp update nad balck list trace level update
Wi-sun EAPOL parent select may fail if device neighbour entry create fail and now we remove current parent and select next one. Change-Id: I317ff92686b2cf1ce00338bb14ad57cd7f01d96c
1 parent 6919ba1 commit 81740b8

File tree

2 files changed

+12
-5
lines changed

2 files changed

+12
-5
lines changed

source/6LoWPAN/ws/ws_bootstrap.c

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2833,6 +2833,7 @@ void ws_bootstrap_network_scan_process(protocol_interface_info_entry_t *cur)
28332833

28342834
tr_debug("analyze network discovery result");
28352835

2836+
select_best_candidate:
28362837
selected_parent_ptr = ws_bootstrap_candidate_parent_get_best(cur);
28372838

28382839
if (!selected_parent_ptr) {
@@ -2851,7 +2852,13 @@ void ws_bootstrap_network_scan_process(protocol_interface_info_entry_t *cur)
28512852
ws_bootstrap_fhss_activate(cur);
28522853
llc_neighbour_req_t neighbor_info;
28532854
if (!ws_bootstrap_neighbor_info_request(cur, selected_parent_ptr->addr, &neighbor_info, true)) {
2854-
return;
2855+
//Remove Neighbour and set Link setup back
2856+
ns_list_remove(&cur->ws_info->parent_list_reserved, selected_parent_ptr);
2857+
ns_list_add_to_end(&cur->ws_info->parent_list_free, selected_parent_ptr);
2858+
// Configure LLC for network discovery
2859+
ws_bootstrap_network_discovery_configure(cur);
2860+
ws_bootstrap_fhss_activate(cur);
2861+
goto select_best_candidate;
28552862
}
28562863

28572864
ws_neighbor_class_neighbor_unicast_time_info_update(neighbor_info.ws_neighbor, &selected_parent_ptr->ws_utt, selected_parent_ptr->timestamp);

source/Service_Libs/blacklist/blacklist.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ bool blacklist_reject(const uint8_t *ll64_address)
8787
if (blacklist_entry) {
8888
// If address is blacklisted rejects
8989
if (blacklist_entry->ttl > blacklist_data->blacklist_entry_lifetime) {
90-
tr_debug("blacklist reject: %s", trace_array(ll64_address + 8, 8));
90+
tr_info("blacklist reject: %s", trace_array(ll64_address + 8, 8));
9191
return true;
9292
// Neighbor heard; updates blacklist entry TTL to full lifetime
9393
} else {
@@ -131,7 +131,7 @@ void blacklist_update(const uint8_t *ll64_address, bool success)
131131
// On successful link establishment remove address from blacklist
132132
if (success) {
133133
if (blacklist_entry) {
134-
tr_debug("Blacklist removed");
134+
tr_info("Blacklist removed");
135135
blacklist_entry_free(blacklist_entry);
136136
}
137137
// On failure add address to blacklist or update timeout
@@ -144,7 +144,7 @@ void blacklist_update(const uint8_t *ll64_address, bool success)
144144
/* TTL is blacklist entry lifetime + from 1.0 to 1.5 * interval */
145145
blacklist_entry->ttl = blacklist_data->blacklist_entry_lifetime + randLIB_randomise_base(blacklist_entry->interval, 0x8000, 0xC000);
146146
} else {
147-
tr_debug("Blacklist add");
147+
tr_info("Blacklist add");
148148
blacklist_entry_add(ll64_address + 8);
149149
}
150150
}
@@ -209,7 +209,7 @@ void blacklist_ttl_update(uint16_t ticks)
209209
if (blacklist_entry->ttl > ticks) {
210210
blacklist_entry->ttl -= ticks;
211211
} else {
212-
tr_debug("Blacklist remove entry: %s", trace_array(blacklist_entry->eui64, 8));
212+
tr_info("Blacklist remove entry: %s", trace_array(blacklist_entry->eui64, 8));
213213
blacklist_entry_free(blacklist_entry);
214214
}
215215
}

0 commit comments

Comments
 (0)