Projects
osmocom:nightly
osmo-hnbgw
Log In
Username
Password
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 531
View file
osmo-hnbgw.spec
Changed
@@ -17,14 +17,14 @@ %define _lto_cflags %{nil} Name: osmo-hnbgw -Requires: osmocom-nightly = 202312032026 -Version: 1.5.0.8.9092.202312032026 +Requires: osmocom-nightly = 202312042026 +Version: 1.5.0.10.5755.202312042026 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.8.9092.202312032026.tar.xz +Source: osmo-hnbgw_1.5.0.10.5755.202312042026.tar.xz Source1: rpmlintrc BuildRequires: automake >= 1.9 BuildRequires: libtool >= 2
View file
osmo-hnbgw_1.5.0.8.9092.202312032026.dsc -> osmo-hnbgw_1.5.0.10.5755.202312042026.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.8.9092.202312032026 +Version: 1.5.0.10.5755.202312042026 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: - 3f0a2a3e54367a9a960c18433730acdef21a8695 99680 osmo-hnbgw_1.5.0.8.9092.202312032026.tar.xz + 93fee6a4207be9642deff1c5aa15936e4336fd0c 100252 osmo-hnbgw_1.5.0.10.5755.202312042026.tar.xz Checksums-Sha256: - 7167f668f8cba90bfa840600ffd11f1c67113d9bfbbc6d0e7f1aa079eae67d17 99680 osmo-hnbgw_1.5.0.8.9092.202312032026.tar.xz + 0acbc7c72a7def7f0d37625665e45a88ae8ac18e610e2316f68a622ae8eaad73 100252 osmo-hnbgw_1.5.0.10.5755.202312042026.tar.xz Files: - 0ea006682051d64ee0d182066ca3c4c2 99680 osmo-hnbgw_1.5.0.8.9092.202312032026.tar.xz + ac3bc9f5229443593d3cbf9da9cb30c2 100252 osmo-hnbgw_1.5.0.10.5755.202312042026.tar.xz
View file
osmo-hnbgw_1.5.0.8.9092.202312032026.tar.xz/.tarball-version -> osmo-hnbgw_1.5.0.10.5755.202312042026.tar.xz/.tarball-version
Changed
@@ -1 +1 @@ -1.5.0.8-9092.202312032026 +1.5.0.10-5755.202312042026
View file
osmo-hnbgw_1.5.0.8.9092.202312032026.tar.xz/contrib/osmo-hnbgw.spec.in -> osmo-hnbgw_1.5.0.10.5755.202312042026.tar.xz/contrib/osmo-hnbgw.spec.in
Changed
@@ -17,7 +17,7 @@ %define _lto_cflags %{nil} Name: osmo-hnbgw -Requires: osmocom-nightly = 202312032026 +Requires: osmocom-nightly = 202312042026 Version: @VERSION@ Release: 0 Summary: OsmoHNBGW: Osmocom's Base Station Controller for 2G CS mobile networks
View file
osmo-hnbgw_1.5.0.8.9092.202312032026.tar.xz/debian/changelog -> osmo-hnbgw_1.5.0.10.5755.202312042026.tar.xz/debian/changelog
Changed
@@ -1,8 +1,8 @@ -osmo-hnbgw (1.5.0.8.9092.202312032026) unstable; urgency=medium +osmo-hnbgw (1.5.0.10.5755.202312042026) unstable; urgency=medium * Automatically generated changelog entry for building the Osmocom nightly feed - -- Osmocom OBS scripts <info@osmocom.org> Sun, 03 Dec 2023 20:26:43 +0000 + -- Osmocom OBS scripts <info@osmocom.org> Mon, 04 Dec 2023 20:26:43 +0000 osmo-hnbgw (1.5.0) unstable; urgency=medium
View file
osmo-hnbgw_1.5.0.8.9092.202312032026.tar.xz/debian/control -> osmo-hnbgw_1.5.0.10.5755.202312042026.tar.xz/debian/control
Changed
@@ -31,7 +31,7 @@ Package: osmo-hnbgw Architecture: any Multi-Arch: foreign -Depends: osmocom-nightly (= 202312032026), ${misc:Depends}, ${shlibs:Depends} +Depends: osmocom-nightly (= 202312042026), ${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 (= 202312032026), osmo-hnbgw (= ${binary:Version}), ${misc:Depends} +Depends: osmocom-nightly (= 202312042026), 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 (= 202312032026), ${misc:Depends} +Depends: osmocom-nightly (= 202312042026), ${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.8.9092.202312032026.tar.xz/src/osmo-hnbgw/mgw_fsm.c -> osmo-hnbgw_1.5.0.10.5755.202312042026.tar.xz/src/osmo-hnbgw/mgw_fsm.c
Changed
@@ -26,6 +26,8 @@ #include <osmocom/core/logging.h> #include <osmocom/core/sockaddr_str.h> +#include <osmocom/netif/stream.h> + #include <osmocom/ranap/ranap_common.h> #include <osmocom/ranap/ranap_common_cn.h> #include <osmocom/ranap/ranap_common_ran.h> @@ -107,6 +109,11 @@ ranap_message *ranap_rab_ass_req_message; ranap_message *ranap_rab_ass_resp_message; struct msgb *ranap_rab_ass_resp_msgb; + /* IP address contained in ranap_rab_ass_resp_msgb/message: */ + struct osmo_sockaddr hnb_rtp_addr; + /* Number of MDCX transmitted. Used to detect current mgw conn_mode and + * detect modify infinite loops: */ + unsigned int mdcx_tx_cnt; /* MGW context */ struct mgcp_client *mgcpc; @@ -132,6 +139,7 @@ { struct mgw_fsm_priv *mgw_fsm_priv = fi->priv; struct hnbgw_context_map *map = mgw_fsm_priv->map; + struct hnb_context *hnb_ctx = map->hnb_ctx; struct osmo_sockaddr addr; struct osmo_sockaddr_str addr_str; RANAP_RAB_AssignmentRequestIEs_t *ies; @@ -168,6 +176,19 @@ mgw_info.codecs0 = CODEC_IUFP; mgw_info.codecs_len = 1; + /* The HNB IuUP IP address & port is not yet known here (Rx RAB-Ass-Req Tx CRCX (RAN) time): + * Assume and announce "remote IuUP IP address" == "remote Iuh signalling IP address" to the MGW + * here, so that it can most probably select a proper IuUP local IP address to be used from the + * start. In the event we receive a "remote IuUP IP address" != "remote Iuh signalling IP address" + * later on during RAB-Ass-Resp, we'll update IP addr at the MGW through MDCX and if MGW decides + * to use another IuUP local IP address as a result, it will be updated at the HNB through + * RAB-Modify-Req. */ + if (hnb_ctx && hnb_ctx->conn && + (rc = osmo_stream_srv_get_fd(hnb_ctx->conn)) >= 0) { + if (osmo_sock_get_remote_ip(rc, mgw_info.addr, sizeof(mgw_info.addr)) < 0) + LOGPFSML(fi, LOGL_ERROR, "Invalid Iuh IP Address\n"); + } + mgw_fsm_priv->mgcpc = mgcp_client_pool_get(g_hnbgw->mgw_pool); if (!mgw_fsm_priv->mgcpc) { LOGPFSML(fi, LOGL_ERROR, @@ -189,8 +210,6 @@ struct mgw_fsm_priv *mgw_fsm_priv = fi->priv; const struct mgcp_conn_peer *mgw_info; struct osmo_sockaddr_str addr_str; - struct osmo_sockaddr *addr = &mgw_fsm_priv->ci_hnb_crcx_ack_addr; - RANAP_RAB_AssignmentRequestIEs_t *ies; int rc; switch (event) { @@ -208,7 +227,7 @@ addr_str.af = AF_INET6; addr_str.port = mgw_info->port; osmo_strlcpy(addr_str.ip, mgw_info->addr, sizeof(addr_str.ip)); - rc = osmo_sockaddr_str_to_sockaddr(&addr_str, &addr->u.sas); + rc = osmo_sockaddr_str_to_sockaddr(&addr_str, &mgw_fsm_priv->ci_hnb_crcx_ack_addr.u.sas); if (rc < 0) { LOGPFSML(fi, LOGL_ERROR, "Failed to convert RTP IP-address (%s) and Port (%u) to its binary representation\n", @@ -217,16 +236,6 @@ return; } - ies = &mgw_fsm_priv->ranap_rab_ass_req_message->msg.raB_AssignmentRequestIEs; - rc = ranap_rab_ass_req_ies_replace_inet_addr(ies, addr, mgw_fsm_priv->rab_id); - if (rc < 0) { - LOGPFSML(fi, LOGL_ERROR, - "Failed to replace RTP IP-address (%s) and Port (%u) in RAB-AssignmentRequest\n", - mgw_info->addr, mgw_info->port); - osmo_fsm_inst_state_chg(fi, MGW_ST_FAILURE, 0, 0); - return; - } - mgw_fsm_state_chg(fi, MGW_ST_ASSIGN); return; default: @@ -240,8 +249,16 @@ struct hnbgw_context_map *map = mgw_fsm_priv->map; RANAP_RAB_AssignmentRequestIEs_t *ies; struct msgb *msg; + int rc; ies = &mgw_fsm_priv->ranap_rab_ass_req_message->msg.raB_AssignmentRequestIEs; + rc = ranap_rab_ass_req_ies_replace_inet_addr(ies, &mgw_fsm_priv->ci_hnb_crcx_ack_addr, mgw_fsm_priv->rab_id); + if (rc < 0) { + LOGPFSML(fi, LOGL_ERROR, "Failed to replace RTP IP-address and Port in RAB-AssignmentRequest\n"); + osmo_fsm_inst_state_chg(fi, MGW_ST_FAILURE, 0, 0); + return; + } + msg = ranap_rab_ass_req_encode(ies); if (!msg) { LOGPFSML(fi, LOGL_ERROR, "failed to re-encode RAB-AssignmentRequest message\n"); @@ -257,9 +274,74 @@ static void mgw_fsm_assign(struct osmo_fsm_inst *fi, uint32_t event, void *data) { + struct mgw_fsm_priv *mgw_fsm_priv = fi->priv; + struct hnbgw_context_map *map = mgw_fsm_priv->map; + RANAP_RAB_AssignmentResponseIEs_t *ies; + bool rab_failed_at_hnb; + struct osmo_sockaddr addr; + enum mgw_fsm_state next_st; + int rc; + switch (event) { case MGW_EV_RAB_ASS_RESP: - mgw_fsm_state_chg(fi, MGW_ST_MDCX_HNB); + LOGPFSML(fi, LOGL_DEBUG, "RAB-AssignmentResponse received, completing HNB side call-leg on MGW...\n"); + ies = &mgw_fsm_priv->ranap_rab_ass_resp_message->msg.raB_AssignmentResponseIEs; + rc = ranap_rab_ass_resp_ies_extract_inet_addr(&addr, ies, mgw_fsm_priv->rab_id); + if (rc < 0) { + rab_failed_at_hnb = ranap_rab_ass_resp_ies_check_failure(ies, mgw_fsm_priv->rab_id); + if (rab_failed_at_hnb) { + struct msgb *msg; + + LOGPFSML(fi, LOGL_ERROR, + "The RAB-AssignmentResponse contains a RAB-FailedList, RAB-Assignment (%u) failed.\n", + mgw_fsm_priv->rab_id); + + /* Forward the RAB-AssignmentResponse transparently. This will ensure that the MSC + * is informed about the problem. */ + LOGPFSML(fi, LOGL_DEBUG, "forwarding unmodified RAB-AssignmentResponse to MSC\n"); + + msg = mgw_fsm_priv->ranap_rab_ass_resp_msgb; + mgw_fsm_priv->ranap_rab_ass_resp_msgb = NULL; + talloc_steal(OTC_SELECT, msg); + + rc = map_sccp_dispatch(map, MAP_SCCP_EV_TX_DATA_REQUEST, msg); + if (rc < 0) { + LOGPFSML(fi, LOGL_DEBUG, "failed to forward RAB-AssignmentResponse message\n"); + osmo_fsm_inst_state_chg(fi, MGW_ST_FAILURE, 0, 0); + } + + /* Even though this is a failure situation, we still release normally as the error is located + * at the HNB. */ + osmo_fsm_inst_state_chg(fi, MGW_ST_RELEASE, 0, 0); + return; + } + + /* The RAB-ID we are dealing with is not on an FailedList and we were unable to parse the response + * normally. This is a situation we cannot recover from. */ + LOGPFSML(fi, LOGL_ERROR, "Failed to extract RTP IP-address and Port from RAB-AssignmentResponse\n"); + osmo_fsm_inst_state_chg(fi, MGW_ST_FAILURE, 0, 0); + return; + } + + /* Break infinite loops modifications between HNB and our MGW: */ + if (mgw_fsm_priv->mdcx_tx_cnt > 3) { + LOGPFSML(fi, LOGL_ERROR, "IuUP addr modification infinite loop detected between HNB and MGW, " + "check your network routing config -- abort!\n"); + osmo_fsm_inst_state_chg(fi, MGW_ST_RELEASE, 0, 0); + return; + } + + /* Send at least 1 MDCX in order to change conn_mode to SEND_RECV. + * From there on, MDCX is only needed if HNB IP/Port changed: */ + if (mgw_fsm_priv->mdcx_tx_cnt == 0 || + osmo_sockaddr_cmp(&addr, &mgw_fsm_priv->hnb_rtp_addr) != 0) { + next_st = MGW_ST_MDCX_HNB; + } else { + LOGPFSML(fi, LOGL_DEBUG, "RAB-AssignmentResponse received with unchanged IuUP attributes, skipping MDCX...\n"); + next_st = MGW_ST_CRCX_MSC; + } + mgw_fsm_priv->hnb_rtp_addr = addr; + mgw_fsm_state_chg(fi, next_st); return; default: OSMO_ASSERT(false); @@ -271,13 +353,8 @@ struct mgw_fsm_priv *mgw_fsm_priv = fi->priv; struct hnbgw_context_map *map = mgw_fsm_priv->map; struct mgcp_conn_peer mgw_info; - struct osmo_sockaddr addr; struct osmo_sockaddr_str addr_str; - RANAP_RAB_AssignmentResponseIEs_t *ies; int rc; - bool rab_failed_at_hnb; - - LOGPFSML(fi, LOGL_DEBUG, "RAB-AssignmentResponse received, completing HNB side call-leg on MGW...\n"); mgw_info = (struct mgcp_conn_peer) { .call_id = map->rua_ctx_id, @@ -287,53 +364,17 @@ mgw_info.codecs0 = CODEC_IUFP; mgw_info.codecs_len = 1; - ies = &mgw_fsm_priv->ranap_rab_ass_resp_message->msg.raB_AssignmentResponseIEs; - rc = ranap_rab_ass_resp_ies_extract_inet_addr(&addr, ies, mgw_fsm_priv->rab_id); - if (rc < 0) { - rab_failed_at_hnb = ranap_rab_ass_resp_ies_check_failure(ies, mgw_fsm_priv->rab_id); - if (rab_failed_at_hnb) {
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
.