Skip to content

Commit 313794c

Browse files
author
Juha Heiskanen
committed
Wi-sun neighbor temporary neigh update
Keep neigh min 120 seconds in all case before remove from the list. 120 seconds must be from last RX packet. Change-Id: Ife14e4606d3c49073fd0590513f266f37a1237b6
1 parent 05fa359 commit 313794c

File tree

3 files changed

+3
-13
lines changed

3 files changed

+3
-13
lines changed

source/6LoWPAN/ws/ws_bootstrap.c

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1368,19 +1368,10 @@ static void ws_bootstrap_neighbor_table_clean(struct protocol_interface_info_ent
13681368
}
13691369
}
13701370

1371-
uint32_t link_min_timeout;
13721371
//Read current timestamp
13731372
uint32_t time_from_last_unicast_shedule = ws_time_from_last_unicast_traffic(current_time_stamp, ws_neighbor);
13741373

1375-
1376-
if (cur->trusted_device) {
1377-
link_min_timeout = WS_NEIGHBOR_TRUSTED_LINK_MIN_TIMEOUT;
1378-
} else {
1379-
1380-
link_min_timeout = WS_NEIGHBOR_NOT_TRUSTED_LINK_MIN_TIMEOUT;
1381-
}
1382-
1383-
if (time_from_last_unicast_shedule > link_min_timeout || !ws_neighbor->unicast_data_rx) {
1374+
if (time_from_last_unicast_shedule > WS_NEIGHBOR_TEMPORARY_LINK_MIN_TIMEOUT || !ws_neighbor->unicast_data_rx) {
13841375
//Accept only Enough Old Device
13851376
if (!neighbor_entry_ptr) {
13861377
//Accept first compare

source/6LoWPAN/ws/ws_common.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -426,7 +426,7 @@ bool ws_common_negative_aro_mark(protocol_interface_info_entry_t *interface, con
426426
}
427427
ws_neighbor_class_entry_t *ws_neighbor = ws_neighbor_class_entry_get(&interface->ws_info->neighbor_storage, neighbour->index);
428428
ws_neighbor->negative_aro_send = true;
429-
neighbour->lifetime = WS_NEIGHBOR_NOT_TRUSTED_LINK_MIN_TIMEOUT; //Remove anyway if Packet is freed before MAC push
429+
neighbour->lifetime = WS_NEIGHBOR_TEMPORARY_LINK_MIN_TIMEOUT; //Remove anyway if Packet is freed before MAC push
430430
return true;
431431
}
432432

source/6LoWPAN/ws/ws_common_defines.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -186,8 +186,7 @@ typedef struct ws_bs_ie {
186186
#define WS_FAN_VERSION_1_0 1
187187

188188
#define WS_NEIGHBOR_LINK_TIMEOUT 2200
189-
#define WS_NEIGHBOR_NOT_TRUSTED_LINK_MIN_TIMEOUT 60
190-
#define WS_NEIGHBOR_TRUSTED_LINK_MIN_TIMEOUT 15
189+
#define WS_NEIGHBOR_TEMPORARY_LINK_MIN_TIMEOUT 120
191190
#define WS_NEIGHBOR_NUD_TIMEOUT WS_NEIGHBOR_LINK_TIMEOUT / 2
192191

193192
#define WS_NEIGBOR_ETX_SAMPLE_MAX 3

0 commit comments

Comments
 (0)