@ -523,10 +523,16 @@ void rrc::ue::handle_rrc_con_reest_req(rrc_conn_reest_request_s* msg)
static_cast < unsigned > ( rrc_event_type : : con_reest_req ) ,
static_cast < unsigned > ( rrc_event_type : : con_reest_req ) ,
static_cast < unsigned > ( procedure_result_code : : none ) ,
static_cast < unsigned > ( procedure_result_code : : none ) ,
rnti ) ;
rnti ) ;
const rrc_conn_reest_request_r8_ies_s & req_r8 = msg - > crit_exts . rrc_conn_reest_request_r8 ( ) ;
uint16_t old_rnti = req_r8 . ue_id . c_rnti . to_number ( ) ;
srsran : : console (
" User 0x%x requesting RRC Reestablishment as 0x%x. Cause: %s \n " , rnti , old_rnti , req_r8 . reest_cause . to_string ( ) ) ;
if ( not parent - > s1ap - > is_mme_connected ( ) ) {
if ( not parent - > s1ap - > is_mme_connected ( ) ) {
parent - > logger . error ( " MME isn't connected. Sending Connection Reject " ) ;
parent - > logger . error ( " MME isn't connected. Sending Connection Reject " ) ;
send_connection_reject ( procedure_result_code : : error_mme_not_connected ) ;
send_connection_reest_rej ( procedure_result_code : : error_mme_not_connected ) ;
srsran : : console ( " User 0x%x RRC Reestablishment Request rejected \n " , rnti ) ;
return ;
return ;
}
}
parent - > logger . debug ( " rnti=0x%x, phyid=0x%x, smac=0x%x, cause=%s " ,
parent - > logger . debug ( " rnti=0x%x, phyid=0x%x, smac=0x%x, cause=%s " ,
@ -535,7 +541,6 @@ void rrc::ue::handle_rrc_con_reest_req(rrc_conn_reest_request_s* msg)
( uint32_t ) msg - > crit_exts . rrc_conn_reest_request_r8 ( ) . ue_id . short_mac_i . to_number ( ) ,
( uint32_t ) msg - > crit_exts . rrc_conn_reest_request_r8 ( ) . ue_id . short_mac_i . to_number ( ) ,
msg - > crit_exts . rrc_conn_reest_request_r8 ( ) . reest_cause . to_string ( ) ) ;
msg - > crit_exts . rrc_conn_reest_request_r8 ( ) . reest_cause . to_string ( ) ) ;
if ( is_idle ( ) ) {
if ( is_idle ( ) ) {
uint16_t old_rnti = msg - > crit_exts . rrc_conn_reest_request_r8 ( ) . ue_id . c_rnti . to_number ( ) ;
uint16_t old_pci = msg - > crit_exts . rrc_conn_reest_request_r8 ( ) . ue_id . pci ;
uint16_t old_pci = msg - > crit_exts . rrc_conn_reest_request_r8 ( ) . ue_id . pci ;
const enb_cell_common * old_cell = parent - > cell_common_list - > get_pci ( old_pci ) ;
const enb_cell_common * old_cell = parent - > cell_common_list - > get_pci ( old_pci ) ;
auto ue_it = parent - > users . find ( old_rnti ) ;
auto ue_it = parent - > users . find ( old_rnti ) ;
@ -590,9 +595,13 @@ void rrc::ue::handle_rrc_con_reest_req(rrc_conn_reest_request_s* msg)
} else {
} else {
parent - > logger . error ( " Received ConnectionReestablishment for rnti=0x%x without context " , old_rnti ) ;
parent - > logger . error ( " Received ConnectionReestablishment for rnti=0x%x without context " , old_rnti ) ;
send_connection_reest_rej ( procedure_result_code : : error_unknown_rnti ) ;
send_connection_reest_rej ( procedure_result_code : : error_unknown_rnti ) ;
srsran : : console (
" User 0x%x RRC Reestablishment Request rejected. Cause: no rnti=0x%x context available \n " , rnti , old_rnti ) ;
}
}
} else {
} else {
parent - > logger . error ( " Received ReestablishmentRequest from an rnti=0x%x not in IDLE " , rnti ) ;
parent - > logger . error ( " Received ReestablishmentRequest from an rnti=0x%x not in IDLE " , rnti ) ;
send_connection_reest_rej ( procedure_result_code : : error_unknown_rnti ) ;
srsran : : console ( " ERROR: User 0x%x requesting Reestablishment is not in RRC_IDLE \n " , rnti ) ;
}
}
}
}
@ -663,8 +672,8 @@ void rrc::ue::handle_rrc_con_reest_complete(rrc_conn_reest_complete_s* msg, srsr
parent - > pdcp - > enable_integrity ( rnti , srb_to_lcid ( lte_srb : : srb1 ) ) ;
parent - > pdcp - > enable_integrity ( rnti , srb_to_lcid ( lte_srb : : srb1 ) ) ;
parent - > pdcp - > enable_encryption ( rnti , srb_to_lcid ( lte_srb : : srb1 ) ) ;
parent - > pdcp - > enable_encryption ( rnti , srb_to_lcid ( lte_srb : : srb1 ) ) ;
// Reestablish current DRBs during ConnectionReconfiguration
// Reestablish E-RABs of old rnti during ConnectionReconfiguration
bearer_list = std : : move ( parent - > users . at ( old_reest_rnti ) - > bearer_list ) ;
bearer_list . reestablish_bearers ( std : : move ( parent - > users . at ( old_reest_rnti ) - > bearer_list ) ) ;
// remove old RNTI
// remove old RNTI
parent - > rem_user_thread ( old_reest_rnti ) ;
parent - > rem_user_thread ( old_reest_rnti ) ;