From 548808eceea41bcf068a5b6a480b73231b407f50 Mon Sep 17 00:00:00 2001 From: Pedro Alvarez Date: Fri, 30 Nov 2018 17:08:05 +0000 Subject: [PATCH] Changing RRC key logging from debug to info. Small readability fix. --- srsenb/src/upper/rrc.cc | 6 +++--- srsue/src/upper/nas.cc | 6 ++++-- srsue/src/upper/rrc.cc | 10 +++++----- 3 files changed, 12 insertions(+), 10 deletions(-) diff --git a/srsenb/src/upper/rrc.cc b/srsenb/src/upper/rrc.cc index f6212021d..9c1ef0f18 100644 --- a/srsenb/src/upper/rrc.cc +++ b/srsenb/src/upper/rrc.cc @@ -1167,9 +1167,9 @@ void rrc::ue::set_security_key(uint8_t* key, uint32_t length) k_up_enc, k_up_int, cipher_algo, integ_algo); - parent->rrc_log->debug_hex(k_rrc_enc, 32, "RRC Encryption Key (k_rrc_enc)"); - parent->rrc_log->debug_hex(k_rrc_int, 32, "RRC Integrity Key (k_rrc_int)"); - parent->rrc_log->debug_hex(k_up_enc, 32, "RRC Encryption Key (k_rrc_enc)"); + 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)"); } bool rrc::ue::setup_erabs(LIBLTE_S1AP_E_RABTOBESETUPLISTCTXTSUREQ_STRUCT *e) diff --git a/srsue/src/upper/nas.cc b/srsue/src/upper/nas.cc index 92c30c3fa..4f90e3bae 100644 --- a/srsue/src/upper/nas.cc +++ b/srsue/src/upper/nas.cc @@ -1178,7 +1178,8 @@ void nas::gen_attach_request(byte_buffer_t *msg) { } if (have_ctxt) { - set_k_enb_count(ctxt.tx_count++); + set_k_enb_count(ctxt.tx_count); + ctxt.tx_count++; } } @@ -1214,7 +1215,8 @@ void nas::gen_service_request(byte_buffer_t *msg) { if(pcap != NULL) { pcap->write_nas(msg->msg, msg->N_bytes); } - set_k_enb_count(ctxt.tx_count++); + set_k_enb_count(ctxt.tx_count); + ctxt.tx_count++; } void nas::gen_pdn_connectivity_request(LIBLTE_BYTE_MSG_STRUCT *msg) { diff --git a/srsue/src/upper/rrc.cc b/srsue/src/upper/rrc.cc index ff7471571..6302164e5 100644 --- a/srsue/src/upper/rrc.cc +++ b/srsue/src/upper/rrc.cc @@ -2074,12 +2074,12 @@ void rrc::parse_dl_dcch(uint32_t lcid, byte_buffer_t *pdu) { // Generate AS security keys uint8_t k_asme[32]; nas->get_k_asme(k_asme, 32); - rrc_log->debug_hex(k_asme, 32, " UE K_asme"); - rrc_log->debug("Generating K_enb. UL NAS COUNT %d\n", nas->get_k_enb_count()); + rrc_log->debug_hex(k_asme, 32, "UE K_asme"); + rrc_log->debug("Generating K_enb with UL NAS COUNT: %d\n", nas->get_k_enb_count()); usim->generate_as_keys(k_asme, nas->get_k_enb_count(), k_rrc_enc, k_rrc_int, k_up_enc, k_up_int, cipher_algo, integ_algo); - rrc_log->debug_hex(k_rrc_enc, 32, "RRC encryption key - k_rrc_enc"); - rrc_log->debug_hex(k_rrc_int, 32, "RRC integrity key - k_rrc_int"); - rrc_log->debug_hex(k_up_enc, 32, "UP encryption key - k_up_enc"); + rrc_log->info_hex(k_rrc_enc, 32, "RRC encryption key - k_rrc_enc"); + rrc_log->info_hex(k_rrc_int, 32, "RRC integrity key - k_rrc_int"); + rrc_log->info_hex(k_up_enc, 32, "UP encryption key - k_up_enc"); security_is_activated = true;