Merge branch 'master' into next

master
Andre Puschmann 6 years ago
commit 10a43f04ba

@ -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);
srslte::byte_buffer_t erab_info;
}; };
@ -333,7 +334,6 @@ private:
srslte::byte_buffer_pool *pool; srslte::byte_buffer_pool *pool;
srslte::bit_buffer_t bit_buf; srslte::bit_buffer_t bit_buf;
srslte::bit_buffer_t bit_buf_paging; srslte::bit_buffer_t bit_buf_paging;
srslte::byte_buffer_t erab_info;
phy_interface_rrc *phy; phy_interface_rrc *phy;
mac_interface_rrc *mac; mac_interface_rrc *mac;

@ -1227,8 +1227,9 @@ 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) {
memcpy(parent->erab_info.msg, nas_pdu->buffer, nas_pdu->n_octets); memcpy(erab_info.buffer, nas_pdu->buffer, nas_pdu->n_octets);
parent->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);
} }
} }
@ -1667,8 +1668,10 @@ void rrc::ue::send_connection_reconf(srslte::byte_buffer_t *pdu)
// Add NAS Attach accept // Add NAS Attach accept
conn_reconf->N_ded_info_nas = 1; conn_reconf->N_ded_info_nas = 1;
conn_reconf->ded_info_nas_list[0].N_bytes = parent->erab_info.N_bytes;
memcpy(conn_reconf->ded_info_nas_list[0].msg, parent->erab_info.msg, parent->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);
// Reuse same PDU // Reuse same PDU
pdu->reset(); pdu->reset();
@ -1725,8 +1728,9 @@ void rrc::ue::send_connection_reconf_new_bearer(LIBLTE_S1AP_E_RABTOBESETUPLISTBE
// DRB has already been configured in GTPU through bearer setup // DRB has already been configured in GTPU through bearer setup
// Add NAS message // Add NAS message
conn_reconf->ded_info_nas_list[conn_reconf->N_ded_info_nas].N_bytes = parent->erab_info.N_bytes; parent->rrc_log->info_hex(erab_info.buffer, erab_info.N_bytes, "reconf_new_bearer erab_info -> nas_info rnti 0x%x\n", rnti);
memcpy(conn_reconf->ded_info_nas_list[conn_reconf->N_ded_info_nas].msg, parent->erab_info.msg, parent->erab_info.N_bytes); conn_reconf->ded_info_nas_list[conn_reconf->N_ded_info_nas].N_bytes = erab_info.N_bytes;
memcpy(conn_reconf->ded_info_nas_list[conn_reconf->N_ded_info_nas].msg, erab_info.buffer, erab_info.N_bytes);
conn_reconf->N_ded_info_nas++; conn_reconf->N_ded_info_nas++;
} }

@ -322,9 +322,14 @@ void nas::write_pdu(uint32_t lcid, byte_buffer_t *pdu) {
case LIBLTE_MME_SECURITY_HDR_TYPE_INTEGRITY: case LIBLTE_MME_SECURITY_HDR_TYPE_INTEGRITY:
break; break;
case LIBLTE_MME_SECURITY_HDR_TYPE_INTEGRITY_AND_CIPHERED: case LIBLTE_MME_SECURITY_HDR_TYPE_INTEGRITY_AND_CIPHERED:
mac_valid = integrity_check(pdu); if((mac_valid = integrity_check(pdu))) {
cipher_decrypt(pdu); cipher_decrypt(pdu);
break; break;
} else {
nas_log->error("Not handling NAS message with integrity check error\n");
pool->deallocate(pdu);
return;
}
case LIBLTE_MME_SECURITY_HDR_TYPE_INTEGRITY_AND_CIPHERED_WITH_NEW_EPS_SECURITY_CONTEXT: case LIBLTE_MME_SECURITY_HDR_TYPE_INTEGRITY_AND_CIPHERED_WITH_NEW_EPS_SECURITY_CONTEXT:
break; break;
default: default:

Loading…
Cancel
Save