@@ -335,9 +335,6 @@ static void link_configuration_copy(link_configuration_s *this, link_configurati
335335 if (!this || !configuration_ptr ) {
336336 return ;
337337 }
338-
339- memcpy (this -> extended_random_mac , configuration_ptr -> extended_random_mac , 8 );
340- memcpy (this -> mesh_local_eid , configuration_ptr -> mesh_local_eid ,5 );
341338 memcpy (this -> name , configuration_ptr -> name , 16 );
342339 memcpy (this -> PSKc , configuration_ptr -> PSKc , 16 );
343340 memcpy (this -> master_key , configuration_ptr -> master_key , 16 );
@@ -871,32 +868,23 @@ void thread_joiner_application_nvm_delete_callback(int status, void *context)
871868
872869static void thread_joiner_application_validate_settings (thread_joiner_t * this )
873870{
874- if (memcmp (this -> device_configuration_ptr -> extended_random_mac ,ADDR_UNSPECIFIED , 8 ) == 0 ) {
875- memcpy (this -> device_configuration_ptr -> extended_random_mac ,this -> configuration_ptr -> extended_random_mac ,8 );
876- }
877871 if (memcmp (this -> device_configuration_ptr -> extended_random_mac ,ADDR_UNSPECIFIED , 8 ) == 0 ) {
878872 randLIB_get_n_bytes_random (this -> device_configuration_ptr -> extended_random_mac , 8 );
879873 this -> device_configuration_ptr -> extended_random_mac [0 ] |= 2 ; //Set Local Bit
880874 this -> device_configuration_ptr -> extended_random_mac [0 ] &= ~1 ; //Clear multicast bit
881875 tr_info ("Generating Random MAC" );
882- memcpy (this -> configuration_ptr -> extended_random_mac ,this -> device_configuration_ptr -> extended_random_mac ,8 );
883- }
884- if (memcmp (this -> device_configuration_ptr -> mesh_local_eid ,ADDR_UNSPECIFIED ,8 )== 0 ){
885- memcpy (this -> device_configuration_ptr -> mesh_local_eid ,this -> configuration_ptr -> mesh_local_eid ,8 );
886876 }
887877 while (addr_iid_reserved (this -> device_configuration_ptr -> mesh_local_eid ) ||
888878 memcmp (this -> device_configuration_ptr -> mesh_local_eid , ADDR_SHORT_ADR_SUFFIC ,6 ) == 0 ) {
889879 // addr_iid_reserved checks the all zeroes case.
890880 randLIB_get_n_bytes_random (this -> device_configuration_ptr -> mesh_local_eid , 8 );
891881 tr_info ("Generating Random ML-EID" );
892- memcpy (this -> configuration_ptr -> mesh_local_eid ,this -> device_configuration_ptr -> mesh_local_eid ,8 );
893882 }
894883 if (this -> configuration_ptr -> key_rotation < 3600 ) {
895884 this -> configuration_ptr -> key_rotation = 3600 ;
896885 }
897886}
898887
899-
900888int thread_joiner_application_init (int8_t interface_id , device_configuration_s * device_configuration_ptr , link_configuration_s * default_configuration_ptr )
901889{
902890 thread_joiner_t * this ;
0 commit comments