Projects
osmocom:nightly
osmo-hnbgw
Log In
Username
Password
Error getting diff: tar:
×
We truncated the diff of some files because they were too big. If you want to see the full diff for every file,
click here
.
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
Expand all
Collapse all
Changes of Revision 647
View file
osmo-hnbgw.spec
Changed
@@ -17,14 +17,14 @@ %define _lto_cflags %{nil} Name: osmo-hnbgw -Requires: osmocom-nightly = 202403282026 -Version: 1.5.0.45.a3c0.202403282026 +Requires: osmocom-nightly = 202403292026 +Version: 1.5.0.51.0606.202403292026 Release: 0 Summary: OsmoHNBGW: Osmocom's Base Station Controller for 2G CS mobile networks License: AGPL-3.0-or-later AND GPL-2.0-or-later Group: Hardware/Mobile URL: https://osmocom.org/projects/osmohnbgw -Source: osmo-hnbgw_1.5.0.45.a3c0.202403282026.tar.xz +Source: osmo-hnbgw_1.5.0.51.0606.202403292026.tar.xz Source1: rpmlintrc BuildRequires: automake >= 1.9 BuildRequires: libtool >= 2
View file
osmo-hnbgw_1.5.0.45.a3c0.202403282026.dsc -> osmo-hnbgw_1.5.0.51.0606.202403292026.dsc
Changed
@@ -2,7 +2,7 @@ Source: osmo-hnbgw Binary: osmo-hnbgw, osmo-hnbgw-dbg, osmo-hnbgw-doc Architecture: any all -Version: 1.5.0.45.a3c0.202403282026 +Version: 1.5.0.51.0606.202403292026 Maintainer: Osmocom team <openbsc@lists.osmocom.org> Homepage: https://projects.osmocom.org/projects/osmo-hnbgw Standards-Version: 3.9.8 @@ -14,8 +14,8 @@ osmo-hnbgw-dbg deb debug extra arch=any osmo-hnbgw-doc deb doc optional arch=all Checksums-Sha1: - 4b0a060ca6864302a1a2685576561295a6588dbb 107032 osmo-hnbgw_1.5.0.45.a3c0.202403282026.tar.xz + 076e65f4f3ba76a4e9ef23beb8eea2fcf635adca 107496 osmo-hnbgw_1.5.0.51.0606.202403292026.tar.xz Checksums-Sha256: - b4d1b39398d78de7c269b0922e801b3d4e4dcae1cc9a1635ef7ce840b186fd9b 107032 osmo-hnbgw_1.5.0.45.a3c0.202403282026.tar.xz + dda6444a2aedbb059b99d8c2e0adec235789c1afb41af88b1465940f0abf3ea7 107496 osmo-hnbgw_1.5.0.51.0606.202403292026.tar.xz Files: - a89346e7c7aa5976df460377329785ba 107032 osmo-hnbgw_1.5.0.45.a3c0.202403282026.tar.xz + af45a214f39f8a3baef1d69f53007cc6 107496 osmo-hnbgw_1.5.0.51.0606.202403292026.tar.xz
View file
osmo-hnbgw_1.5.0.45.a3c0.202403282026.tar.xz/.tarball-version -> osmo-hnbgw_1.5.0.51.0606.202403292026.tar.xz/.tarball-version
Changed
@@ -1 +1 @@ -1.5.0.45-a3c0.202403282026 +1.5.0.51-0606.202403292026
View file
osmo-hnbgw_1.5.0.45.a3c0.202403282026.tar.xz/contrib/osmo-hnbgw.spec.in -> osmo-hnbgw_1.5.0.51.0606.202403292026.tar.xz/contrib/osmo-hnbgw.spec.in
Changed
@@ -17,7 +17,7 @@ %define _lto_cflags %{nil} Name: osmo-hnbgw -Requires: osmocom-nightly = 202403282026 +Requires: osmocom-nightly = 202403292026 Version: @VERSION@ Release: 0 Summary: OsmoHNBGW: Osmocom's Base Station Controller for 2G CS mobile networks
View file
osmo-hnbgw_1.5.0.45.a3c0.202403282026.tar.xz/debian/changelog -> osmo-hnbgw_1.5.0.51.0606.202403292026.tar.xz/debian/changelog
Changed
@@ -1,8 +1,8 @@ -osmo-hnbgw (1.5.0.45.a3c0.202403282026) unstable; urgency=medium +osmo-hnbgw (1.5.0.51.0606.202403292026) unstable; urgency=medium * Automatically generated changelog entry for building the Osmocom nightly feed - -- Osmocom OBS scripts <info@osmocom.org> Thu, 28 Mar 2024 20:26:47 +0000 + -- Osmocom OBS scripts <info@osmocom.org> Fri, 29 Mar 2024 20:26:47 +0000 osmo-hnbgw (1.5.0) unstable; urgency=medium
View file
osmo-hnbgw_1.5.0.45.a3c0.202403282026.tar.xz/debian/control -> osmo-hnbgw_1.5.0.51.0606.202403292026.tar.xz/debian/control
Changed
@@ -31,7 +31,7 @@ Package: osmo-hnbgw Architecture: any Multi-Arch: foreign -Depends: osmocom-nightly (= 202403282026), ${misc:Depends}, ${shlibs:Depends} +Depends: osmocom-nightly (= 202403292026), ${misc:Depends}, ${shlibs:Depends} Recommends: osmo-mgw Description: OsmoHNBGW: Osmocom Home Node B Gateway @@ -39,14 +39,14 @@ Section: debug Architecture: any Multi-Arch: same -Depends: osmocom-nightly (= 202403282026), osmo-hnbgw (= ${binary:Version}), ${misc:Depends} +Depends: osmocom-nightly (= 202403292026), osmo-hnbgw (= ${binary:Version}), ${misc:Depends} Description: OsmoHNBGW: Osmocom Home Node B Gateway Package: osmo-hnbgw-doc Architecture: all Section: doc Priority: optional -Depends: osmocom-nightly (= 202403282026), ${misc:Depends} +Depends: osmocom-nightly (= 202403292026), ${misc:Depends} Description: ${misc:Package} PDF documentation Various manuals: user manual, VTY reference manual and/or protocol/interface manuals.
View file
osmo-hnbgw_1.5.0.45.a3c0.202403282026.tar.xz/src/osmo-hnbgw/hnbgw_hnbap.c -> osmo-hnbgw_1.5.0.51.0606.202403292026.tar.xz/src/osmo-hnbgw/hnbgw_hnbap.c
Changed
@@ -49,16 +49,61 @@ return 0; } -static int hnbgw_tx_hnb_register_rej(struct hnb_context *ctx) +static int hnbgw_tx_error_ind(struct hnb_context *ctx, const HNBAP_Cause_t *cause, + HNBAP_ProcedureCode_t proc_code, HNBAP_Criticality_t criticality, + HNBAP_TriggeringMessage_t trig_msg) +{ + HNBAP_ErrorIndication_t err_ind; + HNBAP_ErrorIndicationIEs_t err_ind_ies; + struct msgb *msg; + int rc; + + LOGHNB(ctx, DHNBAP, LOGL_ERROR, "Tx ErrorIndication cause=%s\n", hnbap_cause_str(cause)); + + err_ind_ies.presenceMask = 0; + err_ind_ies.cause = *cause; + + if (proc_code != -1 || trig_msg != -1 || criticality != -1) { + err_ind_ies.presenceMask |= ERRORINDICATIONIES_HNBAP_CRITICALITYDIAGNOSTICS_PRESENT; + if (proc_code != -1) + err_ind_ies.criticalityDiagnostics.procedureCode = &proc_code; + if (trig_msg != -1) + err_ind_ies.criticalityDiagnostics.triggeringMessage = &trig_msg; + if (criticality != -1) + err_ind_ies.criticalityDiagnostics.procedureCriticality = &criticality; + } + + memset(&err_ind, 0, sizeof(err_ind)); + rc = hnbap_encode_errorindicationies(&err_ind, &err_ind_ies); + if (rc < 0) { + LOGHNB(ctx, DHNBAP, LOGL_ERROR, "Failure to encode ERROR-INDICATION to %s: rc=%d\n", + ctx->identity_info, rc); + return rc; + } + + msg = hnbap_generate_initiating_message(HNBAP_ProcedureCode_id_ErrorIndication, + HNBAP_Criticality_ignore, + &asn_DEF_HNBAP_ErrorIndication, + &err_ind); + + ASN_STRUCT_FREE_CONTENTS_ONLY(asn_DEF_HNBAP_ErrorIndication, &err_ind); + + return hnbgw_hnbap_tx(ctx, msg); +} + +static int hnbgw_tx_hnb_register_rej(struct hnb_context *ctx, const HNBAP_Cause_t *cause) { HNBAP_HNBRegisterReject_t reject_out; HNBAP_HNBRegisterRejectIEs_t reject; struct msgb *msg; int rc; - reject.presenceMask = 0, - reject.cause.present = HNBAP_Cause_PR_radioNetwork; - reject.cause.choice.radioNetwork = HNBAP_CauseRadioNetwork_unspecified; + OSMO_ASSERT(cause); + + LOGHNB(ctx, DHNBAP, LOGL_ERROR, "Rejecting HNB Register Request cause=%s\n", hnbap_cause_str(cause)); + + reject.presenceMask = 0; + reject.cause = *cause; /* encode the Information Elements */ memset(&reject_out, 0, sizeof(reject_out)); @@ -161,13 +206,15 @@ return hnbgw_hnbap_tx(ue->hnb, msg); } -static int hnbgw_tx_ue_register_rej_tmsi(struct hnb_context *hnb, HNBAP_UE_Identity_t *ue_id) +static int hnbgw_tx_ue_register_rej(struct hnb_context *hnb, HNBAP_UE_Identity_t *ue_id, const struct HNBAP_Cause *cause) { HNBAP_UERegisterReject_t reject_out; HNBAP_UERegisterRejectIEs_t reject; struct msgb *msg; int rc; + OSMO_ASSERT(cause); + memset(&reject, 0, sizeof(reject)); reject.uE_Identity.present = ue_id->present; @@ -229,10 +276,9 @@ return -1; } - LOGHNB(hnb, DHNBAP, LOGL_ERROR, "Rejecting UE Register Request: TMSI identity registration is switched off\n"); + LOGHNB(hnb, DHNBAP, LOGL_ERROR, "Rejecting UE Register Request cause=%s\n", hnbap_cause_str(cause)); - reject.cause.present = HNBAP_Cause_PR_radioNetwork; - reject.cause.choice.radioNetwork = HNBAP_CauseRadioNetwork_invalid_UE_identity; + reject.cause = *cause; memset(&reject_out, 0, sizeof(reject_out)); rc = hnbap_encode_ueregisterrejecties(&reject_out, &reject); @@ -388,11 +434,16 @@ static int hnbgw_rx_hnb_deregister(struct hnb_context *ctx, ANY_t *in) { HNBAP_HNBDe_RegisterIEs_t ies; + HNBAP_Cause_t cause; int rc; rc = hnbap_decode_hnbde_registeries(&ies, in); - if (rc < 0) - return rc; + if (rc < 0) { + cause.present = HNBAP_Cause_PR_protocol; + cause.choice.radioNetwork = HNBAP_CauseProtocol_unspecified; + return hnbgw_tx_error_ind(ctx, &cause, HNBAP_ProcedureCode_id_HNBDe_Register, HNBAP_Criticality_ignore, + HNBAP_TriggeringMessage_initiating_message); + } LOGHNB(ctx, DHNBAP, LOGL_DEBUG, "HNB-DE-REGISTER cause=%s\n", hnbap_cause_str(&ies.cause)); @@ -413,11 +464,14 @@ char identity_str256; const char *cell_id_str; struct timespec tp; + HNBAP_Cause_t cause; rc = hnbap_decode_hnbregisterrequesties(&ies, in); if (rc < 0) { LOGHNB(ctx, DHNBAP, LOGL_ERROR, "Failure to decode HNB-REGISTER-REQ: rc=%d\n", rc); - return rc; + cause.present = HNBAP_Cause_PR_protocol; + cause.choice.radioNetwork = HNBAP_CauseProtocol_unspecified; + return hnbgw_tx_hnb_register_rej(ctx, &cause); } asn1_strncpy(identity_str, &ies.hnB_Identity.hNB_Identity_Info, sizeof(identity_str)); @@ -439,7 +493,9 @@ if (!hnbp) { LOGHNB(ctx, DHNBAP, LOGL_NOTICE, "Rejecting unknonwn HNB with identity %s\n", identity_str); hnbap_free_hnbregisterrequesties(&ies); - return hnbgw_tx_hnb_register_rej(ctx); + cause.present = HNBAP_Cause_PR_radioNetwork; + cause.choice.radioNetwork = HNBAP_CauseRadioNetwork_unauthorised_HNB; + return hnbgw_tx_hnb_register_rej(ctx, &cause); } ctx->persistent = hnbp; hnbp->ctx = ctx; @@ -479,7 +535,9 @@ * misconfigurations or someone trying to impersonate an already working HNB: */ LOGHNB(ctx, DHNBAP, LOGL_ERROR, "rejecting HNB-REGISTER-REQ with duplicate cell identity %s\n", cell_id_str); hnbap_free_hnbregisterrequesties(&ies); - return hnbgw_tx_hnb_register_rej(ctx); + cause.present = HNBAP_Cause_PR_radioNetwork; + cause.choice.radioNetwork = HNBAP_CauseRadioNetwork_hNB_parameter_mismatch; + return hnbgw_tx_hnb_register_rej(ctx, &cause); } } @@ -503,14 +561,28 @@ static int hnbgw_rx_ue_register_req(struct hnb_context *ctx, ANY_t *in) { HNBAP_UERegisterRequestIEs_t ies; + HNBAP_Cause_t cause; struct ue_context *ue; struct ue_context *ue_allocated = NULL; char imsi16; int rc; rc = hnbap_decode_ueregisterrequesties(&ies, in); - if (rc < 0) - return rc; + if (rc < 0) { + LOGHNB(ctx, DHNBAP, LOGL_ERROR, "Failure to decode UE-REGISTER-REQ: rc=%d\n", rc); + cause.present = HNBAP_Cause_PR_protocol; + cause.choice.radioNetwork = HNBAP_CauseProtocol_unspecified; + return hnbgw_tx_error_ind(ctx, &cause, HNBAP_ProcedureCode_id_UERegister, HNBAP_Criticality_reject, + HNBAP_TriggeringMessage_initiating_message); + } + + if (!ctx->hnb_registered) { + /* UE registration requires prior HNB registration; reject with proper cause */ + cause.present = HNBAP_Cause_PR_radioNetwork; + cause.choice.radioNetwork = HNBAP_CauseRadioNetwork_hNB_not_registered; + rc = hnbgw_tx_ue_register_rej(ctx, &ies.uE_Identity, &cause); + goto free_and_return_rc; + } switch (ies.uE_Identity.present) { case HNBAP_UE_Identity_PR_iMSI: @@ -527,16 +599,21 @@ break; case HNBAP_UE_Identity_PR_tMSILAI: case HNBAP_UE_Identity_PR_pTMSIRAI: - if (g_hnbgw->config.hnbap_allow_tmsi) + if (g_hnbgw->config.hnbap_allow_tmsi) { rc = hnbgw_tx_ue_register_acc_tmsi(ctx, &ies.uE_Identity); - else - rc = hnbgw_tx_ue_register_rej_tmsi(ctx, &ies.uE_Identity); + } else { + cause.present = HNBAP_Cause_PR_radioNetwork; + cause.choice.radioNetwork = HNBAP_CauseRadioNetwork_invalid_UE_identity; + rc = hnbgw_tx_ue_register_rej(ctx, &ies.uE_Identity, &cause); + } /* all has been handled by TMSI, skip the IMSI code below */ goto free_and_return_rc;
Locations
Projects
Search
Status Monitor
Help
Open Build Service
OBS Manuals
API Documentation
OBS Portal
Reporting a Bug
Contact
Mailing List
Forums
Chat (IRC)
Twitter
Open Build Service (OBS)
is an
openSUSE project
.