@ -901,6 +901,7 @@ rrc::ue::ue()
cqi_sched_sf_idx = 0 ;
cqi_sched_prb_idx = 0 ;
rlf_cnt = 0 ;
nas_pending = false ;
state = RRC_STATE_IDLE ;
pool = srslte : : byte_buffer_pool : : get_instance ( ) ;
}
@ -1227,9 +1228,12 @@ void rrc::ue::setup_erab(uint8_t id, LIBLTE_S1AP_E_RABLEVELQOSPARAMETERS_STRUCT
parent - > gtpu - > add_bearer ( rnti , lcid , addr_ , erabs [ id ] . teid_out , & ( erabs [ id ] . teid_in ) ) ;
if ( nas_pdu ) {
nas_pending = true ;
memcpy ( erab_info . buffer , nas_pdu - > buffer , nas_pdu - > n_octets ) ;
erab_info . N_bytes = nas_pdu - > n_octets ;
parent - > rrc_log - > info_hex ( erab_info . buffer , erab_info . N_bytes , " setup_erab nas_pdu -> erab_info rnti 0x%x " , rnti ) ;
} else {
nas_pending = false ;
}
}
@ -1667,12 +1671,17 @@ void rrc::ue::send_connection_reconf(srslte::byte_buffer_t *pdu)
// DRB1 has already been configured in GTPU through bearer setup
// Add NAS Attach accept
if ( nas_pending ) {
parent - > rrc_log - > debug ( " Adding NAS message to connection reconfiguration \n " ) ;
conn_reconf - > N_ded_info_nas = 1 ;
parent - > rrc_log - > info_hex ( erab_info . buffer , erab_info . N_bytes , " connection_reconf erab_info -> nas_info rnti 0x%x \n " , rnti ) ;
conn_reconf - > ded_info_nas_list [ 0 ] . N_bytes = erab_info . N_bytes ;
memcpy ( conn_reconf - > ded_info_nas_list [ 0 ] . msg , erab_info . buffer , erab_info . N_bytes ) ;
} else {
parent - > rrc_log - > debug ( " Not adding NAS message to connection reconfiguration \n " ) ;
conn_reconf - > N_ded_info_nas = 0 ;
}
// Reuse same PDU
pdu - > reset ( ) ;