diff --git a/lib/test/asn1/s1ap_test.cc b/lib/test/asn1/s1ap_test.cc index 8f891c3e6..1d09d6086 100644 --- a/lib/test/asn1/s1ap_test.cc +++ b/lib/test/asn1/s1ap_test.cc @@ -19,7 +19,6 @@ * */ -#include "srslte/asn1/liblte_s1ap.h" #include "srslte/asn1/s1ap_asn1.h" #include "srslte/common/log_filter.h" #include "srslte/common/test_common.h" diff --git a/srsenb/hdr/stack/upper/s1ap.h b/srsenb/hdr/stack/upper/s1ap.h index 680c9ca06..5c69c56e5 100644 --- a/srsenb/hdr/stack/upper/s1ap.h +++ b/srsenb/hdr/stack/upper/s1ap.h @@ -32,7 +32,6 @@ #include "srslte/interfaces/enb_interfaces.h" #include "s1ap_metrics.h" -#include "srslte/asn1/liblte_s1ap.h" #include "srslte/common/network_utils.h" #include "srslte/common/stack_procedure.h" diff --git a/srsenb/src/stack/rrc/rrc.cc b/srsenb/src/stack/rrc/rrc.cc index 1240766bf..f0d09a4cd 100644 --- a/srsenb/src/stack/rrc/rrc.cc +++ b/srsenb/src/stack/rrc/rrc.cc @@ -22,14 +22,12 @@ #include "srsenb/hdr/stack/rrc/rrc.h" #include "srsenb/hdr/stack/rrc/rrc_mobility.h" #include "srslte/asn1/asn1_utils.h" -#include "srslte/asn1/liblte_mme.h" #include "srslte/asn1/rrc_asn1_utils.h" #include "srslte/common/bcd_helpers.h" #include "srslte/common/int_helpers.h" #include "srslte/interfaces/sched_interface.h" #include "srslte/srslte.h" -using srslte::bit_buffer_t; using srslte::byte_buffer_t; using srslte::uint32_to_uint8; using srslte::uint8_to_uint32; @@ -1267,7 +1265,9 @@ void rrc::ue::set_security_capabilities(const asn1::s1ap::ue_security_cap_s& cap void rrc::ue::set_security_key(const asn1::fixed_bitstring<256, false, true>& key) { - memcpy(k_enb, key.data(), key.nof_octets()); + for (uint32_t i = 0; i < key.nof_octets(); ++i) { + k_enb[i] = key.data()[key.nof_octets() - 1 - i]; + } parent->rrc_log->info_hex(k_enb, 32, "Key eNodeB (k_enb)"); // Selects security algorithms (cipher_algo and integ_algo) based on capabilities and config preferences select_security_algorithms(); diff --git a/srsenb/src/stack/upper/s1ap.cc b/srsenb/src/stack/upper/s1ap.cc index 9bd02fed7..32c2491e3 100644 --- a/srsenb/src/stack/upper/s1ap.cc +++ b/srsenb/src/stack/upper/s1ap.cc @@ -1278,7 +1278,7 @@ bool s1ap::ue::send_ho_required(uint32_t target_eci, auto& eutra = transparent_cntr.ue_history_info[0].set_e_utran_cell(); eutra.cell_type.cell_size.value = cell_size_opts::medium; target_plmn.to_s1ap_plmn_bytes(eutra.global_cell_id.plm_nid.data()); - for (uint32_t i = 0; i < LIBLTE_S1AP_CELLIDENTITY_BIT_STRING_LEN; ++i) { + for (uint32_t i = 0; i < eutra.global_cell_id.cell_id.length(); ++i) { eutra.global_cell_id.cell_id.set(i, s1ap_ptr->eutran_cgi.cell_ID.buffer[i]); } // - set time spent in current source cell