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_prb_idx;
int get_drbid_config(LIBLTE_RRC_DRB_TO_ADD_MOD_STRUCT *drb, int drbid);
bool nas_pending;
srslte::byte_buffer_t erab_info;
};
@ -363,6 +364,7 @@ private:
uint32_t nof_users[100][80];
} sr_sched_t;
sr_sched_t sr_sched;
sr_sched_t cqi_sched;
LIBLTE_RRC_MCCH_MSG_STRUCT mcch;

@ -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();

Loading…
Cancel
Save