neels has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-hnbgw/+/33180 )
Change subject: include Global RNC-ID in RESET-ACK ......................................................................
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, 30 insertions(+), 1 deletion(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-hnbgw refs/changes/80/33180/1
diff --git a/src/osmo-hnbgw/cnlink.c b/src/osmo-hnbgw/cnlink.c index 561e5ff..d4bd48b 100644 --- a/src/osmo-hnbgw/cnlink.c +++ b/src/osmo-hnbgw/cnlink.c @@ -169,6 +169,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"); @@ -180,7 +183,20 @@ 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 no PLMN is configured, omit the Global RNC Id from the RESET message */ + 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; + } + + 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,