Skip to content
This repository was archived by the owner on May 23, 2023. It is now read-only.

Commit 74db027

Browse files
fix for sleepy node poll. (ARMmbed#1750)
1 parent 49adf2e commit 74db027

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

source/6LoWPAN/MAC/mac_data_poll.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -285,15 +285,15 @@ void mac_poll_timer_trig(uint32_t poll_time, protocol_interface_info_entry_t *cu
285285
static mac_neighbor_table_entry_t *neighbor_data_poll_referesh(protocol_interface_info_entry_t *cur, uint8_t *address, addrtype_t type)
286286
{
287287
mac_neighbor_table_entry_t *entry = mac_neighbor_table_address_discover(mac_neighbor_info(cur), address, type);
288+
288289
if (!entry) {
289290
return NULL;
290291
}
291292

292-
if (entry->connected_device) {
293+
if (!entry->connected_device) {
293294
return NULL;
294295
}
295296

296-
297297
if (!entry->nud_active) {
298298
entry->lifetime = entry->link_lifetime;
299299
}

source/Service_Libs/mac_neighbor_table/mac_neighbor_table.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,10 @@ mac_neighbor_table_entry_t *mac_neighbor_table_entry_allocate(mac_neighbor_table
140140
entry->mac16 = 0xffff;
141141
entry->rx_on_idle = true;
142142
entry->ffd_device = true;
143+
entry->nud_active = false;
144+
entry->advertisment = false;
145+
entry->connected_device = false;
146+
entry->trusted_device = false;
143147
entry->lifetime = NEIGHBOR_CLASS_LINK_DEFAULT_LIFETIME;
144148
entry->link_lifetime = NEIGHBOR_CLASS_LINK_DEFAULT_LIFETIME;
145149
entry->link_role = NORMAL_NEIGHBOUR;

0 commit comments

Comments
 (0)