[PATCH] osmo-iuh[master]: fix osmo-hnbgw HNBAP: different RNC Id for each hNodeB

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

Neels Hofmeyr gerrit-no-reply at lists.osmocom.org
Sun Dec 10 13:36:04 UTC 2017


Review at  https://gerrit.osmocom.org/5264

fix osmo-hnbgw HNBAP: different RNC Id for each hNodeB

Give each hNodeB its own RNC Id upon HNBAP to keep consistent LAC records in
MSC and SGSN, and hence fix paging in the presence of more than one RNC.

So far we were handing out identical RNC Id = 23 for each hNodeB that attaches.

This lead to paging errors: the iu_client keeps only the *latest* the LAC
record for a given RNC Id. Hence if one LAC asks to send an SMS to another,
that other LAC would be pushed out of the single RNC record kept for RNC 23:

  DRANAP <001a> ../../../src/osmo-iuh/src/iu_client.c:155 RNC 23 changes its details: LAC=24358 RAC=0 --> LAC=14357 RAC=0
  ...
  DRANAP <001a> ../../../src/osmo-iuh/src/iu_client.c:155 RNC 23 changes its details: LAC=14357 RAC=0 --> LAC=24358 RAC=0

This swaps back and forth.

Presumably, this should also fix IuPS paging, but this has not been pinpointed
/ analysed / verified.

Change-Id: I5ea89ebe60b2afc31d87fc1e2145e46f83c34f07
---
M include/osmocom/iuh/hnbgw.h
M src/hnbgw.c
M src/hnbgw_hnbap.c
3 files changed, 3 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-iuh refs/changes/64/5264/1

diff --git a/include/osmocom/iuh/hnbgw.h b/include/osmocom/iuh/hnbgw.h
index 58bdab4..5230c83 100644
--- a/include/osmocom/iuh/hnbgw.h
+++ b/include/osmocom/iuh/hnbgw.h
@@ -118,13 +118,14 @@
 		uint16_t iuh_cs_mux_port;
 		const char *iucs_remote_addr_name;
 		const char *iups_remote_addr_name;
-		uint16_t rnc_id;
 		bool hnbap_allow_tmsi;
 	} config;
 	/*! SCTP listen socket for incoming connections */
 	struct osmo_stream_srv_link *iuh;
 	/* list of struct hnb_context */
 	struct llist_head hnb_list;
+	/* next RNC id to assign during HNBAP */
+	uint16_t next_rnc_id;
 	/* list of struct ue_context */
 	struct llist_head ue_list;
 	/* next availble UE Context ID */
diff --git a/src/hnbgw.c b/src/hnbgw.c
index 5c0570e..2c14917 100644
--- a/src/hnbgw.c
+++ b/src/hnbgw.c
@@ -430,7 +430,6 @@
 	msgb_talloc_ctx_init(tall_hnb_ctx, 0);
 
 	g_hnb_gw = hnb_gw_create(tall_hnb_ctx);
-	g_hnb_gw->config.rnc_id = 23;
 
 	rc = osmo_init_logging(&hnbgw_log_info);
 	if (rc < 0)
diff --git a/src/hnbgw_hnbap.c b/src/hnbgw_hnbap.c
index 7c1e239..f21548f 100644
--- a/src/hnbgw_hnbap.c
+++ b/src/hnbgw_hnbap.c
@@ -56,7 +56,7 @@
 
 	/* Single required response IE: RNC-ID */
 	HNBRegisterAcceptIEs_t accept = {
-		.rnc_id = ctx->gw->config.rnc_id
+		.rnc_id = ctx->gw->next_rnc_id ++,
 	};
 
 	/* encode the Information Elements */

-- 
To view, visit https://gerrit.osmocom.org/5264
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I5ea89ebe60b2afc31d87fc1e2145e46f83c34f07
Gerrit-PatchSet: 1
Gerrit-Project: osmo-iuh
Gerrit-Branch: master
Gerrit-Owner: Neels Hofmeyr <nhofmeyr at sysmocom.de>



More information about the gerrit-log mailing list