From e0937d1dd1086a9432d7420ca49a45abdaf18414 Mon Sep 17 00:00:00 2001 From: Francisco Date: Thu, 21 Jan 2021 10:19:40 +0000 Subject: [PATCH] add lcid check and increase limit to 10 --- lib/include/srslte/interfaces/sched_interface.h | 2 +- srsenb/src/stack/rrc/rrc_bearer_cfg.cc | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/include/srslte/interfaces/sched_interface.h b/lib/include/srslte/interfaces/sched_interface.h index d2fd868e1..bc0939117 100644 --- a/lib/include/srslte/interfaces/sched_interface.h +++ b/lib/include/srslte/interfaces/sched_interface.h @@ -31,7 +31,7 @@ public: const static int MAX_SIB_PAYLOAD_LEN = 2048; const static int MAX_SIBS = 16; - const static int MAX_LC = 10; + const static int MAX_LC = 11; const static int MAX_LC_GROUP = 4; const static int MAX_DATA_LIST = 32; const static int MAX_RAR_LIST = 8; diff --git a/srsenb/src/stack/rrc/rrc_bearer_cfg.cc b/srsenb/src/stack/rrc/rrc_bearer_cfg.cc index c569a25c6..ea0342d2d 100644 --- a/srsenb/src/stack/rrc/rrc_bearer_cfg.cc +++ b/srsenb/src/stack/rrc/rrc_bearer_cfg.cc @@ -223,6 +223,10 @@ int bearer_cfg_handler::add_erab(uint8_t log_h->error("QCI=%d not configured\n", qos.qci); return SRSLTE_ERROR; } + if (lcid < 3 or lcid > 10) { + log_h->error("DRB logical channel ids must be within 3 and 10\n"); + return SRSLTE_ERROR; + } erabs[erab_id].id = erab_id; erabs[erab_id].qos_params = qos;