@@ -239,10 +239,8 @@ static void mle_multicast_push_to_sleep_child(protocol_interface_info_entry_t *c
239239 return ;
240240 }
241241 ns_list_foreach (mle_neigh_table_entry_t , cur_entry , mle_neigh_list ) {
242- if (cur_entry -> threadNeighbor ) {
243- if (!(cur_entry -> mode & MLE_RX_ON_IDLE )) {
244- clone_multicast_to_unicast (cur , cur_entry , buf );
245- }
242+ if (!(cur_entry -> mode & MLE_RX_ON_IDLE )) {
243+ clone_multicast_to_unicast (cur , cur_entry , buf );
246244 }
247245 }
248246}
@@ -261,7 +259,7 @@ static void thread_registered_mcast_forward_to_child(protocol_interface_info_ent
261259
262260 ns_list_foreach (thread_mcast_child_t , child , & addr -> children ) {
263261 mle_neigh_table_entry_t * mle_entry = mle_class_get_by_link_address (cur -> id , child -> mac64 , ADDR_802_15_4_LONG );
264- if (mle_entry && mle_entry -> threadNeighbor && !(mle_entry -> mode & MLE_RX_ON_IDLE )) {
262+ if (!(mle_entry -> mode & MLE_RX_ON_IDLE )) {
265263 clone_multicast_to_unicast (cur , mle_entry , buffer );
266264 }
267265 }
@@ -361,7 +359,6 @@ static void thread_router_synch_receive_cb(int8_t interface_id, mle_message_t *m
361359
362360 //Free Response
363361 mle_service_msg_free (messageId );
364- entry_temp -> threadNeighbor = true;
365362 entry_temp -> short_adr = shortAddress ;
366363
367364 //when allocating neighbour entry, use MLE Frame counter if present to validate further advertisements from the neighbour
@@ -1328,7 +1325,6 @@ void thread_router_bootstrap_child_id_handler(protocol_interface_info_entry_t *c
13281325
13291326 mle_entry_timeout_update (entry_temp , req -> timeout );
13301327 entry_temp -> mode = req -> mode ;
1331- entry_temp -> threadNeighbor = true;
13321328 entry_temp -> handshakeReady = 1 ;
13331329 mle_service_frame_counter_table_add (cur -> id , entry_temp -> attribute_index , req -> mleFrameCounter );
13341330
@@ -1864,7 +1860,6 @@ void thread_router_bootstrap_mle_receive_cb(int8_t interface_id, mle_message_t *
18641860 thread_management_key_synch_req (cur -> id , common_read_32_bit (security_headers -> Keysource ));
18651861 }
18661862
1867- entry_temp -> threadNeighbor = true;
18681863 entry_temp -> short_adr = shortAddress ;
18691864 mlme_device_descriptor_t device_desc ;
18701865 mac_helper_device_description_write (cur , & device_desc , entry_temp -> mac64 , entry_temp -> short_adr ,llFrameCounter , false);
@@ -2469,7 +2464,6 @@ void thread_router_bootstrap_timer(protocol_interface_info_entry_t *cur, uint32_
24692464void thread_router_bootstrap_advertiment_analyze (protocol_interface_info_entry_t * cur , uint8_t * src_address , mle_neigh_table_entry_t * entry_temp , uint16_t shortAddress )
24702465{
24712466 if (entry_temp ) {
2472- entry_temp -> threadNeighbor = true;
24732467
24742468 if (entry_temp -> timeout_rx == 0 || thread_is_router_addr (shortAddress )) {
24752469 entry_temp -> timeout_rx = THREAD_DEFAULT_LINK_LIFETIME / MLE_TIMER_TICKS_SECONDS ;
@@ -2669,16 +2663,14 @@ static void thread_router_bootstrap_network_data_push_to_sleep_child(protocol_in
26692663 mle_neigh_table_list_t * mle_table = mle_class_active_list_get (cur -> id );
26702664 memcpy (childLinkLocalAddress , ADDR_LINK_LOCAL_PREFIX , 8 );
26712665 ns_list_foreach (mle_neigh_table_entry_t , cur_entry , mle_table ) {
2672- if (cur_entry -> threadNeighbor ) {
2673- if (!(cur_entry -> mode & MLE_RX_ON_IDLE )) {
2674- memcpy (& childLinkLocalAddress [8 ], cur_entry -> mac64 , 8 );
2675- childLinkLocalAddress [8 ] ^= 2 ;
2676- if (cur_entry -> mode & MLE_THREAD_REQ_FULL_DATA_SET ) {
2677- thread_router_bootstrap_network_data_propagation (cur , childLinkLocalAddress , true);
2678- } else {
2679- if (stableDataUpdate ) {
2680- thread_router_bootstrap_network_data_propagation (cur , childLinkLocalAddress , false);
2681- }
2666+ if (!(cur_entry -> mode & MLE_RX_ON_IDLE )) {
2667+ memcpy (& childLinkLocalAddress [8 ], cur_entry -> mac64 , 8 );
2668+ childLinkLocalAddress [8 ] ^= 2 ;
2669+ if (cur_entry -> mode & MLE_THREAD_REQ_FULL_DATA_SET ) {
2670+ thread_router_bootstrap_network_data_propagation (cur , childLinkLocalAddress , true);
2671+ } else {
2672+ if (stableDataUpdate ) {
2673+ thread_router_bootstrap_network_data_propagation (cur , childLinkLocalAddress , false);
26822674 }
26832675 }
26842676 }
0 commit comments