From b77be2ae28d7acc86d27e208320d3a82a45d75df Mon Sep 17 00:00:00 2001 From: Robert Schmidt Date: Wed, 30 Jul 2025 17:20:57 +0200 Subject: [PATCH] Telnet CI: Handle error of no RNTI --- common/utils/telnetsrv/telnetsrv_ci.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/common/utils/telnetsrv/telnetsrv_ci.c b/common/utils/telnetsrv/telnetsrv_ci.c index 4b84a8ca93..24dba02191 100644 --- a/common/utils/telnetsrv/telnetsrv_ci.c +++ b/common/utils/telnetsrv/telnetsrv_ci.c @@ -136,6 +136,8 @@ int trigger_reestab(char *buf, int debug, telnet_printfunc_t prnt) if (!RC.nrmac) ERROR_MSG_RET("no MAC/RLC present, cannot trigger reestablishment\n"); int rnti = fetch_rnti(buf, prnt); + if (rnti < 0) + ERROR_MSG_RET("could not identify UE (no UE, no such RNTI, or multiple UEs)\n"); nr_rlc_test_trigger_reestablishment(rnti); prnt("Reset RLC counters of UE RNTI %04x to trigger reestablishment\n", rnti); return 0; @@ -199,6 +201,8 @@ int force_ul_failure(char *buf, int debug, telnet_printfunc_t prnt) if (!RC.nrmac) ERROR_MSG_RET("no MAC/RLC present, force_ul_failure failed\n"); int rnti = fetch_rnti(buf, prnt); + if (rnti < 0) + ERROR_MSG_RET("could not identify UE (no UE, no such RNTI, or multiple UEs)\n"); NR_UE_info_t *UE = find_nr_UE(&RC.nrmac[0]->UE_info, rnti); nr_mac_trigger_ul_failure(&UE->UE_sched_ctrl, UE->current_UL_BWP.scs); return 0; @@ -208,6 +212,8 @@ int force_ue_release(char *buf, int debug, telnet_printfunc_t prnt) { force_ul_failure(buf, debug, prnt); int rnti = fetch_rnti(buf, prnt); + if (rnti < 0) + ERROR_MSG_RET("could not identify UE (no UE, no such RNTI, or multiple UEs)\n"); NR_UE_info_t *UE = find_nr_UE(&RC.nrmac[0]->UE_info, rnti); NR_UE_sched_ctrl_t *sched_ctrl = &UE->UE_sched_ctrl; sched_ctrl->ul_failure_timer = 2; @@ -218,6 +224,8 @@ int force_ue_release(char *buf, int debug, telnet_printfunc_t prnt) static int get_current_bwp(char *buf, int debug, telnet_printfunc_t prnt) { int rnti = fetch_rnti(buf, prnt); + if (rnti < 0) + ERROR_MSG_RET("could not identify UE (no UE, no such RNTI, or multiple UEs)\n"); NR_UE_info_t *UE = find_nr_UE(&RC.nrmac[0]->UE_info, rnti); int dl_bwp = UE->current_DL_BWP.bwp_id; const char *dl_bwp_text = dl_bwp > 0 ? "dedicated" : "initial";