Integrity fail after service request (#268)

* Adding some debug prints to confirm the issue.
* Cleanup whitespaces.
* More debug prints
* Adding boolean to whether it is actually necessary to send NAS message in RRC reconfiguration.
* Deleting debug prints.
master
Pedro Alvarez 6 years ago committed by Andre Puschmann
parent 42e46bc599
commit 7b4bc6f132

@ -296,6 +296,7 @@ public:
int cqi_sched_sf_idx; int cqi_sched_sf_idx;
int cqi_sched_prb_idx; int cqi_sched_prb_idx;
int get_drbid_config(LIBLTE_RRC_DRB_TO_ADD_MOD_STRUCT *drb, int drbid); int get_drbid_config(LIBLTE_RRC_DRB_TO_ADD_MOD_STRUCT *drb, int drbid);
bool nas_pending;
srslte::byte_buffer_t erab_info; srslte::byte_buffer_t erab_info;
}; };
@ -363,6 +364,7 @@ private:
uint32_t nof_users[100][80]; uint32_t nof_users[100][80];
} sr_sched_t; } sr_sched_t;
sr_sched_t sr_sched; sr_sched_t sr_sched;
sr_sched_t cqi_sched; sr_sched_t cqi_sched;
LIBLTE_RRC_MCCH_MSG_STRUCT mcch; LIBLTE_RRC_MCCH_MSG_STRUCT mcch;

@ -885,24 +885,25 @@ void rrc::activity_monitor::run_thread()
*******************************************************************************/ *******************************************************************************/
rrc::ue::ue() rrc::ue::ue()
{ {
parent = NULL; parent = NULL;
set_activity(); set_activity();
has_tmsi = false; has_tmsi = false;
connect_notified = false; connect_notified = false;
transaction_id = 0; transaction_id = 0;
sr_allocated = false; sr_allocated = false;
sr_sched_sf_idx = 0; sr_sched_sf_idx = 0;
sr_sched_prb_idx = 0; sr_sched_prb_idx = 0;
sr_N_pucch = 0; sr_N_pucch = 0;
sr_I = 0; sr_I = 0;
cqi_allocated = false; cqi_allocated = false;
cqi_pucch = 0; cqi_pucch = 0;
cqi_idx = 0; cqi_idx = 0;
cqi_sched_sf_idx = 0; cqi_sched_sf_idx = 0;
cqi_sched_prb_idx = 0; cqi_sched_prb_idx = 0;
rlf_cnt = 0; rlf_cnt = 0;
state = RRC_STATE_IDLE; nas_pending = false;
pool = srslte::byte_buffer_pool::get_instance(); state = RRC_STATE_IDLE;
pool = srslte::byte_buffer_pool::get_instance();
} }
rrc_state_t rrc::ue::get_state() rrc_state_t rrc::ue::get_state()
@ -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)); parent->gtpu->add_bearer(rnti, lcid, addr_, erabs[id].teid_out, &(erabs[id].teid_in));
if(nas_pdu) { if(nas_pdu) {
nas_pending = true;
memcpy(erab_info.buffer, nas_pdu->buffer, nas_pdu->n_octets); memcpy(erab_info.buffer, nas_pdu->buffer, nas_pdu->n_octets);
erab_info.N_bytes = 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); 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 // DRB1 has already been configured in GTPU through bearer setup
// Add NAS Attach accept // Add NAS Attach accept
conn_reconf->N_ded_info_nas = 1; if(nas_pending){
parent->rrc_log->debug("Adding NAS message to connection reconfiguration\n");
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->N_ded_info_nas = 1;
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);
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 // Reuse same PDU
pdu->reset(); pdu->reset();

Loading…
Cancel
Save