From f5f61162ff5eb334954b4ab95aac41f7901640f1 Mon Sep 17 00:00:00 2001 From: Guido Casati Date: Mon, 9 Jun 2025 12:25:11 +0200 Subject: [PATCH] Add mismatch warning in AMF selection utility functions --- openair3/NGAP/ngap_gNB_nnsf.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/openair3/NGAP/ngap_gNB_nnsf.c b/openair3/NGAP/ngap_gNB_nnsf.c index 77cc7866e1..f895737a0d 100644 --- a/openair3/NGAP/ngap_gNB_nnsf.c +++ b/openair3/NGAP/ngap_gNB_nnsf.c @@ -30,6 +30,7 @@ #include "ngap_gNB_nnsf.h" #include #include "ngap_gNB_defs.h" +#include "ngap_common.h" #include "queue.h" #include "tree.h" @@ -222,6 +223,12 @@ ngap_gNB_amf_data_t *ngap_gNB_nnsf_select_amf_by_amf_setid(ngap_gNB_instance_t * } } + NGAP_WARN("No matching AMF found for PLMN (MCC=%03d MNC=%0*d) and AMF SetID=%u\n", + selected_plmn_identity.mcc, + selected_plmn_identity.mnc_digit_length, + selected_plmn_identity.mnc, + amf_setid); + /* At this point no AMF matches the selected PLMN and AMF code. In this case, * return NULL. That way the RRC layer should know about it and reject RRC * connectivity. */ @@ -314,6 +321,14 @@ ngap_gNB_amf_data_t *ngap_gNB_nnsf_select_amf_by_guami(ngap_gNB_instance_t *inst } } + NGAP_WARN("No matching AMF found for GUAMI (MCC=%03d MNC=%0*d RegionID=%d SetID=%d Pointer=%d)\n", + guami.mcc, + guami.mnc_len, + guami.mnc, + guami.amf_region_id, + guami.amf_set_id, + guami.amf_pointer); + /* At this point no AMF matches the provided GUAMI. In this case, return * NULL. That way the RRC layer should know about it and reject RRC * connectivity. */