neels has submitted this change. ( https://gerrit.osmocom.org/c/osmo-hnbgw/+/33176 )
(
4 is the latest approved patch-set.
No files were changed between the latest approved patch-set and the submitted one.
)Change subject: use cnlink state in cnpool decisions
......................................................................
use cnlink state in cnpool decisions
Change-Id: I28490a4a27bcda8fd689db8b8652e451103e3a9d
---
M src/osmo-hnbgw/hnbgw_cn.c
1 file changed, 11 insertions(+), 1 deletion(-)
Approvals:
pespin: Looks good to me, but someone else must approve
laforge: Looks good to me, approved
Jenkins Builder: Verified
diff --git a/src/osmo-hnbgw/hnbgw_cn.c b/src/osmo-hnbgw/hnbgw_cn.c
index 977766b..cf22ba4 100644
--- a/src/osmo-hnbgw/hnbgw_cn.c
+++ b/src/osmo-hnbgw/hnbgw_cn.c
@@ -656,7 +656,8 @@
return false;
if (!cnlink->hnbgw_sccp_user || !cnlink->hnbgw_sccp_user->sccp_user)
return false;
- // TODO indicator whether the CN link is actually active, akin to bssmap_reset_is_conn_ready()
+ if (!cnlink_is_conn_ready(cnlink))
+ return false;
return true;
}
--
To view, visit https://gerrit.osmocom.org/c/osmo-hnbgw/+/33176
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-hnbgw
Gerrit-Branch: master
Gerrit-Change-Id: I28490a4a27bcda8fd689db8b8652e451103e3a9d
Gerrit-Change-Number: 33176
Gerrit-PatchSet: 8
Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: merged
neels has submitted this change. ( https://gerrit.osmocom.org/c/osmo-hnbgw/+/33179 )
(
5 is the latest approved patch-set.
No files were changed between the latest approved patch-set and the submitted one.
)Change subject: include Global RNC-ID in RESET
......................................................................
include Global RNC-ID in RESET
According to 3GPP TS 25.413 8.26.2.2, "The RNC shall include the Global
RNC-ID IE in the RESET message."
Related: SYS#6441
Change-Id: I2cd5d7ea86a6ed0916befe219dbf21373afbd95b
---
M TODO-RELEASE
M src/osmo-hnbgw/cnlink.c
2 files changed, 44 insertions(+), 1 deletion(-)
Approvals:
laforge: Looks good to me, but someone else must approve
pespin: Looks good to me, approved
Jenkins Builder: Verified
diff --git a/TODO-RELEASE b/TODO-RELEASE
index 10cb13b..37cadc5 100644
--- a/TODO-RELEASE
+++ b/TODO-RELEASE
@@ -12,3 +12,4 @@
Uses osmo_scu_prim_hdr_name_c()
libosmo-mgcp-client > 1.11.0 mgcp_client_pool_empty(), mgcp_client_conf_alloc()
libosmo-sigtran >1.7.0 Require presence of vty 'cs7 instance'/'sccp max-optional-data' that the deprecated+fatal 'hnbgw'/'sccp cr...' tells the user to use instead.
+libosmo-ranap >1.4.0 ranap_new_msg_reset2()
diff --git a/src/osmo-hnbgw/cnlink.c b/src/osmo-hnbgw/cnlink.c
index c98d713..1b4af7f 100644
--- a/src/osmo-hnbgw/cnlink.c
+++ b/src/osmo-hnbgw/cnlink.c
@@ -25,6 +25,7 @@
#include <osmocom/sigtran/sccp_helpers.h>
+#include <asn1c/asn1helpers.h>
#include <osmocom/ranap/ranap_ies_defs.h>
#include <osmocom/ranap/ranap_msg_factory.h>
@@ -127,6 +128,9 @@
.present = RANAP_Cause_PR_transmissionNetwork,
.choice. transmissionNetwork = RANAP_CauseTransmissionNetwork_signalling_transport_resource_failure,
};
+ RANAP_GlobalRNC_ID_t grnc_id;
+ RANAP_GlobalRNC_ID_t *use_grnc_id = NULL;
+ uint8_t plmn_buf[3];
if (!cnlink)
return;
@@ -144,7 +148,32 @@
cnlink_is_cs(cnlink) ? "IuCS" : "IuPS",
cnlink_sccp_addr_to_str(cnlink, &cnlink->remote_addr));
- msg = ranap_new_msg_reset(cnlink->pool->domain, &cause);
+ 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 message.
+ *
+ * According to 3GPP TS 25.413 8.26.2.2, "The RNC shall include the Global RNC-ID IE in the RESET
+ * 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 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_reset2(cnlink->pool->domain, &cause, use_grnc_id);
osmo_sccp_tx_unitdata_msg(cnlink->hnbgw_sccp_user->sccp_user,
&cnlink->hnbgw_sccp_user->local_addr,
--
To view, visit https://gerrit.osmocom.org/c/osmo-hnbgw/+/33179
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-hnbgw
Gerrit-Branch: master
Gerrit-Change-Id: I2cd5d7ea86a6ed0916befe219dbf21373afbd95b
Gerrit-Change-Number: 33179
Gerrit-PatchSet: 8
Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: merged
neels has submitted this change. ( https://gerrit.osmocom.org/c/osmo-hnbgw/+/33180 )
(
5 is the latest approved patch-set.
No files were changed between the latest approved patch-set and the submitted one.
)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, 42 insertions(+), 1 deletion(-)
Approvals:
laforge: Looks good to me, but someone else must approve
pespin: Looks good to me, approved
Jenkins Builder: Verified
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 https://gerrit.osmocom.org/c/osmo-hnbgw/+/33180
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-hnbgw
Gerrit-Branch: master
Gerrit-Change-Id: I49d351e90dfe4a7c4dfdd26542565f2d9bd3d605
Gerrit-Change-Number: 33180
Gerrit-PatchSet: 8
Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: merged
neels has submitted this change. ( https://gerrit.osmocom.org/c/osmo-hnbgw/+/33331 )
(
2 is the latest approved patch-set.
No files were changed between the latest approved patch-set and the submitted one.
)Change subject: RUA: log tweak
......................................................................
RUA: log tweak
I noticed that the log is awfully silent about disconnecting RUA, even
with DEBUG turned on. It is an important item that should show in the
logs.
Change-Id: I87592cbf197d5d3d2a22b04d9f6b64422af65ded
---
M src/osmo-hnbgw/context_map_rua.c
1 file changed, 14 insertions(+), 0 deletions(-)
Approvals:
pespin: Looks good to me, but someone else must approve
neels: Looks good to me, approved
Jenkins Builder: Verified
diff --git a/src/osmo-hnbgw/context_map_rua.c b/src/osmo-hnbgw/context_map_rua.c
index 09c275d..6064b1c 100644
--- a/src/osmo-hnbgw/context_map_rua.c
+++ b/src/osmo-hnbgw/context_map_rua.c
@@ -262,6 +262,7 @@
.present = RUA_Cause_PR_radioNetwork,
.choice.radioNetwork = RUA_CauseRadioNetwork_network_release,
};
+ LOGPFSML(fi, LOGL_INFO, "Tx RUA Disconnect\n");
if (rua_tx_disc(map->hnb_ctx, map->is_ps, map->rua_ctx_id, &rua_cause, NULL, 0))
LOGPFSML(fi, LOGL_ERROR, "Failed to send Disconnect to RUA\n");
}
--
To view, visit https://gerrit.osmocom.org/c/osmo-hnbgw/+/33331
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-hnbgw
Gerrit-Branch: master
Gerrit-Change-Id: I87592cbf197d5d3d2a22b04d9f6b64422af65ded
Gerrit-Change-Number: 33331
Gerrit-PatchSet: 3
Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: merged