From a40a2dc191a7dc78fe1ae02c61511f73c27f7ef0 Mon Sep 17 00:00:00 2001 From: Pedro Alvarez Date: Fri, 22 Oct 2021 16:39:07 +0100 Subject: [PATCH] Disable integrity/encription at PDCP-NR, as it will break when packets arrive out-of-order. --- srsue/src/stack/rrc/rrc_nr.cc | 29 ++++++++--------------------- 1 file changed, 8 insertions(+), 21 deletions(-) diff --git a/srsue/src/stack/rrc/rrc_nr.cc b/srsue/src/stack/rrc/rrc_nr.cc index 0aed24a96..70820e048 100644 --- a/srsue/src/stack/rrc/rrc_nr.cc +++ b/srsue/src/stack/rrc/rrc_nr.cc @@ -1447,17 +1447,11 @@ bool rrc_nr::apply_security_cfg(const security_cfg_s& security_cfg) case ciphering_algorithm_e::nea0: sec_cfg.cipher_algo = CIPHERING_ALGORITHM_ID_EEA0; break; - case ciphering_algorithm_e::nea1: - sec_cfg.cipher_algo = CIPHERING_ALGORITHM_ID_128_EEA1; - break; - case ciphering_algorithm_e::nea2: - sec_cfg.cipher_algo = CIPHERING_ALGORITHM_ID_128_EEA2; - break; - case ciphering_algorithm_e::nea3: - sec_cfg.cipher_algo = CIPHERING_ALGORITHM_ID_128_EEA3; - break; default: - logger.warning("Unsupported algorithm %s", security_cfg.security_algorithm_cfg.ciphering_algorithm.to_string()); + logger.error("Ciphering not supported by PDCP-NR at the moment %s. Requested algorithm=%s", + security_cfg.security_algorithm_cfg.ciphering_algorithm.to_string()); + srsran::console("Ciphering not supported by PDCP-NR at the moment. Requested algorithm=%s\n", + security_cfg.security_algorithm_cfg.ciphering_algorithm.to_string()); return false; } @@ -1466,18 +1460,11 @@ bool rrc_nr::apply_security_cfg(const security_cfg_s& security_cfg) case integrity_prot_algorithm_e::nia0: sec_cfg.integ_algo = INTEGRITY_ALGORITHM_ID_EIA0; break; - case integrity_prot_algorithm_e::nia1: - sec_cfg.integ_algo = INTEGRITY_ALGORITHM_ID_128_EIA1; - break; - case integrity_prot_algorithm_e::nia2: - sec_cfg.integ_algo = INTEGRITY_ALGORITHM_ID_128_EIA2; - break; - case integrity_prot_algorithm_e::nia3: - sec_cfg.integ_algo = INTEGRITY_ALGORITHM_ID_128_EIA3; - break; default: - logger.warning("Unsupported algorithm %s", - security_cfg.security_algorithm_cfg.integrity_prot_algorithm.to_string()); + logger.error("Integrity protection not supported by PDCP-NR at the moment. Requested algorithm=%s.", + security_cfg.security_algorithm_cfg.ciphering_algorithm.to_string()); + srsran::console("Integrity protection not supported by PDCP-NR at the moment. Requested algorithm %s.\n", + security_cfg.security_algorithm_cfg.ciphering_algorithm.to_string()); return false; } }