neels submitted this change.
5 is the latest approved patch-set.
No files were changed between the latest approved patch-set and the submitted one.
include Global RNC-ID in RESET-ACK
According to 3GPP TS 25.413 8.26.2.1, "The RNC shall include the Global
RNC-ID IE in the RESET ACKNOWLEDGE message."
Related: SYS#6441
Change-Id: I49d351e90dfe4a7c4dfdd26542565f2d9bd3d605
---
M src/osmo-hnbgw/cnlink.c
1 file changed, 42 insertions(+), 1 deletion(-)
diff --git a/src/osmo-hnbgw/cnlink.c b/src/osmo-hnbgw/cnlink.c
index 1b4af7f..0ff8163 100644
--- a/src/osmo-hnbgw/cnlink.c
+++ b/src/osmo-hnbgw/cnlink.c
@@ -185,6 +185,9 @@
{
struct msgb *msg;
struct osmo_sccp_instance *sccp = cnlink_sccp(cnlink);
+ RANAP_GlobalRNC_ID_t grnc_id;
+ RANAP_GlobalRNC_ID_t *use_grnc_id = NULL;
+ uint8_t plmn_buf[3];
if (!sccp) {
LOG_CNLINK(cnlink, DRANAP, LOGL_ERROR, "cannot send RANAP RESET ACK: no CN link\n");
@@ -196,7 +199,32 @@
cnlink_sccp_addr_to_str(cnlink, &cnlink->hnbgw_sccp_user->local_addr),
cnlink_sccp_addr_to_str(cnlink, &cnlink->remote_addr));
- msg = ranap_new_msg_reset_ack(cnlink->pool->domain, NULL);
+ if (g_hnbgw->config.plmn.mcc) {
+ osmo_plmn_to_bcd(plmn_buf, &g_hnbgw->config.plmn);
+ grnc_id = (RANAP_GlobalRNC_ID_t){
+ .pLMNidentity = {
+ .buf = plmn_buf,
+ .size = 3,
+ },
+ .rNC_ID = g_hnbgw->config.rnc_id,
+ };
+ use_grnc_id = &grnc_id;
+ } else {
+ /* If no PLMN is configured, omit the Global RNC Id from the RESET ACK message.
+ *
+ * According to 3GPP TS 25.413 8.26.2.1, "The RNC shall include the Global RNC-ID IE in the RESET
+ * ACKNOWLEDGE message", so it should be considered a mandatory IE when coming from us, the RNC.
+ *
+ * But osmo-hnbgw < v1.5 worked well with osmo-hnbgw.cfg files that have no PLMN configured, and we are
+ * trying to stay backwards compatible for those users. Such a site should still work, but they should
+ * now see these error logs and can adjust the config.
+ */
+ LOG_CNLINK(cnlink, DRANAP, LOGL_ERROR,
+ "No local PLMN is configured, so outgoing RESET ACKNOWLEDGE messages omit the mandatory"
+ " Global RNC-ID IE. You should set a 'hnbgw' / 'plmn' in your config file (since v1.5)\n");
+ }
+
+ msg = ranap_new_msg_reset_ack(cnlink->pool->domain, use_grnc_id);
osmo_sccp_tx_unitdata_msg(cnlink->hnbgw_sccp_user->sccp_user,
&cnlink->hnbgw_sccp_user->local_addr,
To view, visit change 33180. To unsubscribe, or for help writing mail filters, visit settings.