From 3de8a746fe91989f66f040a0f349f9926ab8cb51 Mon Sep 17 00:00:00 2001 From: Robert Schmidt Date: Thu, 28 Nov 2024 08:53:35 +0100 Subject: [PATCH] Fix eq_f1ap_cell_info(): correct TAC comparison Check that both a->tac/b->tac are present, or both not present. Then, check they are equal if present. --- openair2/F1AP/lib/f1ap_lib_common.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/openair2/F1AP/lib/f1ap_lib_common.c b/openair2/F1AP/lib/f1ap_lib_common.c index 2dc149a8be..a569146815 100644 --- a/openair2/F1AP/lib/f1ap_lib_common.c +++ b/openair2/F1AP/lib/f1ap_lib_common.c @@ -53,7 +53,10 @@ bool eq_f1ap_cell_info(const f1ap_served_cell_info_t *a, const f1ap_served_cell_ { _F1_EQ_CHECK_LONG(a->nr_cellid, b->nr_cellid); _F1_EQ_CHECK_INT(a->nr_pci, b->nr_pci); - _F1_EQ_CHECK_INT(*a->tac, *b->tac); + if ((!a->tac) ^ (!b->tac)) + return false; + if (a->tac) + _F1_EQ_CHECK_INT(*a->tac, *b->tac); _F1_EQ_CHECK_INT(a->mode, b->mode); if (a->mode == F1AP_MODE_TDD) { /* TDD */