Fixed Bearer ID for data Bearer and changed debug type for enc data pdus

This commit is contained in:
David Rupprecht 2019-02-15 09:15:20 +01:00 committed by Andre Puschmann
parent b84e49310e
commit 735f97ceb6
2 changed files with 6 additions and 5 deletions

View File

@ -85,7 +85,7 @@ void pdcp_entity::init(srsue::rlc_interface_pdcp *rlc_,
sn_len_bytes = 2;
}
log->debug("Init %s\n", rrc->get_rb_name(lcid).c_str());
log->info("Init %s with bearer ID: %d\n", rrc->get_rb_name(lcid).c_str(), cfg.bearer_id);
}
// Reestablishment procedure: 36.323 5.2
@ -205,7 +205,7 @@ void pdcp_entity::write_pdu(byte_buffer_t *pdu)
rx_count,
pdu->N_bytes - sn_len_bytes,
&(pdu->msg[sn_len_bytes]));
log->info_hex(pdu->msg, pdu->N_bytes, "RX %s PDU (decrypted)", rrc->get_rb_name(lcid).c_str());
log->debug_hex(pdu->msg, pdu->N_bytes, "RX %s PDU (decrypted)", rrc->get_rb_name(lcid).c_str());
}
if(12 == cfg.sn_len)
{

View File

@ -1212,7 +1212,7 @@ void rrc::ue::set_security_key(uint8_t* key, uint32_t length)
memcpy(k_enb, key, length);
parent->rrc_log->info_hex(k_enb, 32, "Key eNodeB (k_enb)");
// Select algos (TODO: use security capabilities and config preferences)
cipher_algo = srslte::CIPHERING_ALGORITHM_ID_EEA0; // FIXME: Should i keep this type???
cipher_algo = srslte::CIPHERING_ALGORITHM_ID_128_EEA2; // FIXME: Should i keep this type???
integ_algo = srslte::INTEGRITY_ALGORITHM_ID_128_EIA1;
// Generate K_rrc_enc and K_rrc_int
@ -1234,7 +1234,7 @@ void rrc::ue::set_security_key(uint8_t* key, uint32_t length)
parent->rrc_log->info_hex(k_rrc_enc, 32, "RRC Encryption Key (k_rrc_enc)");
parent->rrc_log->info_hex(k_rrc_int, 32, "RRC Integrity Key (k_rrc_int)");
parent->rrc_log->info_hex(k_up_enc, 32, "RRC Encryption Key (k_rrc_enc)");
parent->rrc_log->info_hex(k_up_enc, 32, "UP Encryption Key (k_up_enc)");
}
bool rrc::ue::setup_erabs(LIBLTE_S1AP_E_RABTOBESETUPLISTCTXTSUREQ_STRUCT *e)
@ -1773,6 +1773,7 @@ void rrc::ue::send_connection_reconf(srslte::byte_buffer_t *pdu)
// Configure DRB1 in PDCP
pdcp_cnfg.is_control = false;
pdcp_cnfg.is_data = true;
pdcp_cnfg.bearer_id = 1; // TODO: Review all ID mapping LCID DRB ERAB EPSBID Mapping
if (conn_reconf->rr_cfg_ded.drb_to_add_mod_list[0].pdcp_cfg.rlc_um_present) {
if (conn_reconf->rr_cfg_ded.drb_to_add_mod_list[0].pdcp_cfg.rlc_um.pdcp_sn_size.value ==
pdcp_cfg_s::rlc_um_s_::pdcp_sn_size_e_::len7bits) {
@ -1841,7 +1842,7 @@ void rrc::ue::send_connection_reconf_new_bearer(LIBLTE_S1AP_E_RABTOBESETUPLISTBE
parent->rlc->add_bearer(rnti, lcid, &drb_item.rlc_cfg);
// Configure DRB in PDCP
srslte::srslte_pdcp_config_t pdcp_config;
pdcp_config.bearer_id = drb_item.drb_id;
pdcp_config.bearer_id = drb_item.drb_id - 1; // TODO: Review all ID mapping LCID DRB ERAB EPSBID Mapping
pdcp_config.is_data = true;
pdcp_config.direction = SECURITY_DIRECTION_DOWNLINK;
parent->pdcp->add_bearer(rnti, lcid, pdcp_config);