From d5274af0ec12c182072c22d3e6d0f320c0c11880 Mon Sep 17 00:00:00 2001 From: Robert Schmidt Date: Tue, 15 Oct 2024 15:12:27 +0200 Subject: [PATCH] Bugfix: correctly check for GTP initialization The existing check for the initialization of GTP is wrong; GTP returns -1 if it could not initialize. Correct this, such that the DU will stop if GTP cannot be initialize. If we continue, the DU is requested to set up a GTP tunnel; because GTP is not initialized, it assumes it is in monolithic/no F1, and does not set up a tunnel. The F1 UE Context setup response encoder then fails with this assertion: Assertion (tnl->teid > 0) failed! In DU_send_UE_CONTEXT_SETUP_RESPONSE() ../../../openair2/F1AP/f1ap_du_ue_context_management.c:415 Exiting execution ../../../openair2/F1AP/f1ap_du_ue_context_management.c:415 DU_send_UE_CONTEXT_SETUP_RESPONSE() Exiting OAI softmodem: _Assert_Exit_ Aborted Closes: #853 --- openair2/F1AP/f1ap_du_task.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openair2/F1AP/f1ap_du_task.c b/openair2/F1AP/f1ap_du_task.c index 6c4f8c3be6..d221d3b35c 100644 --- a/openair2/F1AP/f1ap_du_task.c +++ b/openair2/F1AP/f1ap_du_task.c @@ -142,7 +142,7 @@ void *F1AP_DU_task(void *arg) { createF1inst(myInstance, msgSetup, nc); du_task_send_sctp_association_req(myInstance, nc); instance_t gtpInst = du_create_gtpu_instance_to_cu(nc); - AssertFatal(gtpInst != 0, "cannot create DU F1-U GTP module\n"); + AssertFatal(gtpInst > 0, "cannot create DU F1-U GTP module\n"); getCxt(myInstance)->gtpInst = gtpInst; DUuniqInstance = gtpInst; } break;