@@ -335,9 +335,6 @@ static void link_configuration_copy(link_configuration_s *this, link_configurati
335
335
if (!this || !configuration_ptr ) {
336
336
return ;
337
337
}
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 );
341
338
memcpy (this -> name , configuration_ptr -> name , 16 );
342
339
memcpy (this -> PSKc , configuration_ptr -> PSKc , 16 );
343
340
memcpy (this -> master_key , configuration_ptr -> master_key , 16 );
@@ -871,32 +868,23 @@ void thread_joiner_application_nvm_delete_callback(int status, void *context)
871
868
872
869
static void thread_joiner_application_validate_settings (thread_joiner_t * this )
873
870
{
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
- }
877
871
if (memcmp (this -> device_configuration_ptr -> extended_random_mac ,ADDR_UNSPECIFIED , 8 ) == 0 ) {
878
872
randLIB_get_n_bytes_random (this -> device_configuration_ptr -> extended_random_mac , 8 );
879
873
this -> device_configuration_ptr -> extended_random_mac [0 ] |= 2 ; //Set Local Bit
880
874
this -> device_configuration_ptr -> extended_random_mac [0 ] &= ~1 ; //Clear multicast bit
881
875
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 );
886
876
}
887
877
while (addr_iid_reserved (this -> device_configuration_ptr -> mesh_local_eid ) ||
888
878
memcmp (this -> device_configuration_ptr -> mesh_local_eid , ADDR_SHORT_ADR_SUFFIC ,6 ) == 0 ) {
889
879
// addr_iid_reserved checks the all zeroes case.
890
880
randLIB_get_n_bytes_random (this -> device_configuration_ptr -> mesh_local_eid , 8 );
891
881
tr_info ("Generating Random ML-EID" );
892
- memcpy (this -> configuration_ptr -> mesh_local_eid ,this -> device_configuration_ptr -> mesh_local_eid ,8 );
893
882
}
894
883
if (this -> configuration_ptr -> key_rotation < 3600 ) {
895
884
this -> configuration_ptr -> key_rotation = 3600 ;
896
885
}
897
886
}
898
887
899
-
900
888
int thread_joiner_application_init (int8_t interface_id , device_configuration_s * device_configuration_ptr , link_configuration_s * default_configuration_ptr )
901
889
{
902
890
thread_joiner_t * this ;
0 commit comments