From 81bb35c3909173fa8b85083732555f3e6a61950a Mon Sep 17 00:00:00 2001
From: Sukchan Lee
Date: Wed, 4 Feb 2026 20:51:29 +0900
Subject: [PATCH] nrf: Fix serving PLMN counter reset on NF register
NFProfile plmn_list returned from NRF overwrites the local serving
PLMN configuration. Reset num_of_serving_plmn_id instead of the
unused nf_instance->num_of_plmn_id to avoid stale accumulation.
Issues: #4207
---
README.md | 10 ----------
lib/sbi/nnrf-handler.c | 2 +-
2 files changed, 1 insertion(+), 11 deletions(-)
diff --git a/README.md b/README.md
index f930db620..78f9b949b 100644
--- a/README.md
+++ b/README.md
@@ -8,16 +8,6 @@ Please follow the [documentation](https://open5gs.org/open5gs/docs/) at [open5gs
If you find Open5GS useful for work, please consider supporting this Open Source project by [Becoming a sponsor](https://github.com/sponsors/acetcom). To manage the funding transactions transparently, you can donate through [OpenCollective](https://opencollective.com/open5gs).
-
-
Special Sponsor
-
-
-
-
-
-
-
-
diff --git a/lib/sbi/nnrf-handler.c b/lib/sbi/nnrf-handler.c
index 48da6db41..44578c34f 100644
--- a/lib/sbi/nnrf-handler.c
+++ b/lib/sbi/nnrf-handler.c
@@ -50,7 +50,7 @@ void ogs_nnrf_nfm_handle_nf_register(
nf_instance->time.heartbeat_interval = NFProfile->heart_beat_timer;
if (NFProfile->plmn_list) {
- nf_instance->num_of_plmn_id = 0;
+ ogs_local_conf()->num_of_serving_plmn_id = 0;
OpenAPI_list_for_each(NFProfile->plmn_list, node) {
OpenAPI_plmn_id_t *PlmnId = node->data;
if (PlmnId) {