Projects
osmocom:master
osmo-bsc
Sign Up
Log In
Username
Password
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
Expand all
Collapse all
Changes of Revision 101
View file
osmo-bsc.spec
Changed
@@ -18,13 +18,13 @@ Name: osmo-bsc Requires: osmocom-master -Version: 1.10.0.81.6b20 +Version: 1.10.0.84.895826 Release: 0 Summary: OsmoBSC: 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/osmobsc -Source: osmo-bsc_1.10.0.81.6b20.tar.xz +Source: osmo-bsc_1.10.0.84.895826.tar.xz Source1: rpmlintrc BuildRequires: automake >= 1.9 BuildRequires: libtool >= 2
View file
commit_6b204ebd668048297ff72e9d85029690d3f04f00.txt
Deleted
View file
commit_8958269ea9cffe7ace6bd57a860606cd651cd46c.txt
Added
View file
osmo-bsc_1.10.0.81.6b20.dsc -> osmo-bsc_1.10.0.84.895826.dsc
Changed
@@ -2,7 +2,7 @@ Source: osmo-bsc Binary: osmo-bsc, osmo-bsc-dbg, abisip-find, osmo-bsc-ipaccess-utils, osmo-bsc-bs11-utils, osmo-bsc-meas-utils, osmo-bsc-doc Architecture: any all -Version: 1.10.0.81.6b20 +Version: 1.10.0.84.895826 Maintainer: Osmocom team <openbsc@lists.osmocom.org> Homepage: https://projects.osmocom.org/projects/osmo-bsc Standards-Version: 3.9.8 @@ -18,8 +18,8 @@ osmo-bsc-ipaccess-utils deb net extra arch=any osmo-bsc-meas-utils deb net extra arch=any Checksums-Sha1: - 4579b5d293d5b54a43309fda9ee7512f2931da59 594548 osmo-bsc_1.10.0.81.6b20.tar.xz + a31dbab0df0bae0bc4cd248b9fdb5924fba390fc 595020 osmo-bsc_1.10.0.84.895826.tar.xz Checksums-Sha256: - 0de4e875ba85056f95ac3390e3e3ead0789cf0d53b15b4d76c19609b95d9284a 594548 osmo-bsc_1.10.0.81.6b20.tar.xz + 056698c66ebff238eb80345b92e50e0bf29585b17f3fa346c9a04cab26ea5d58 595020 osmo-bsc_1.10.0.84.895826.tar.xz Files: - 91ac1adfd9974a5ea431f30a2f986512 594548 osmo-bsc_1.10.0.81.6b20.tar.xz + d5c48bf74f966a2a4cbb12709b6e06ec 595020 osmo-bsc_1.10.0.84.895826.tar.xz
View file
osmo-bsc_1.10.0.81.6b20.tar.xz/.tarball-version -> osmo-bsc_1.10.0.84.895826.tar.xz/.tarball-version
Changed
@@ -1 +1 @@ -1.10.0.81-6b20 +1.10.0.84-895826
View file
osmo-bsc_1.10.0.81.6b20.tar.xz/debian/changelog -> osmo-bsc_1.10.0.84.895826.tar.xz/debian/changelog
Changed
@@ -1,8 +1,8 @@ -osmo-bsc (1.10.0.81.6b20) unstable; urgency=medium +osmo-bsc (1.10.0.84.895826) unstable; urgency=medium * Automatically generated changelog entry for building the Osmocom master feed - -- Osmocom OBS scripts <info@osmocom.org> Mon, 13 Mar 2023 11:03:33 +0000 + -- Osmocom OBS scripts <info@osmocom.org> Mon, 13 Mar 2023 15:32:28 +0000 osmo-bsc (1.10.0) unstable; urgency=medium
View file
osmo-bsc_1.10.0.81.6b20.tar.xz/include/osmocom/bsc/gsm_data.h -> osmo-bsc_1.10.0.84.895826.tar.xz/include/osmocom/bsc/gsm_data.h
Changed
@@ -51,6 +51,9 @@ * with delta = time between expiration of T3124 and receiving HANDOVER FAILURE by the serving BSC. */ #define GSM_NY1_DEFAULT ((unsigned long)((GSM_T3124_MAX + GSM_NY1_REQ_DELTA)/GSM_T3105_DEFAULT + 1)) +#define SCCP_CONN_ID_UNSET 0xFFFFFFFF +#define SCCP_CONN_ID_MAX 0x00FFFFFE + struct mgcp_client_conf; struct mgcp_client; struct gsm0808_cell_id; @@ -328,8 +331,10 @@ /* SCCP connection related */ struct bsc_msc_data *msc; - /* Sigtran connection ID */ - int conn_id; + /* Sigtran connection ID: + * if set: Range (0..SCCP_CONN_ID_MAX) (24 bit) + * if unset: SCCP_CONN_ID_UNSET (-1) if unset */ + uint32_t conn_id; enum subscr_sccp_state state; } sccp; @@ -379,7 +384,10 @@ /* Lb interface to the SMLC: BSSMAP-LE/SCCP connection associated with this subscriber */ struct { - int conn_id; + /* Sigtran connection ID: + * if set: Range (0..SCCP_CONN_ID_MAX) (24 bit) + * if unset: SCCP_CONN_ID_UNSET (-1) if unset */ + uint32_t conn_id; enum subscr_sccp_state state; } lb; } lcs; @@ -1022,7 +1030,7 @@ enum gsm48_rr_cause bsc_gsm48_rr_cause_from_gsm0808_cause(enum gsm0808_cause c); enum gsm48_rr_cause bsc_gsm48_rr_cause_from_rsl_cause(uint8_t c); -int bsc_sccp_inst_next_conn_id(struct osmo_sccp_instance *sccp); +uint32_t bsc_sccp_inst_next_conn_id(struct osmo_sccp_instance *sccp); /* Interference Measurement Parameters */ struct gsm_interf_meas_params {
View file
osmo-bsc_1.10.0.81.6b20.tar.xz/src/osmo-bsc/bsc_sccp.c -> osmo-bsc_1.10.0.84.895826.tar.xz/src/osmo-bsc/bsc_sccp.c
Changed
@@ -21,24 +21,41 @@ * */ +#include <osmocom/core/utils.h> + #include <osmocom/bsc/gsm_data.h> #include <osmocom/bsc/bsc_msc_data.h> #include <osmocom/bsc/lb.h> /* We need an unused SCCP conn_id across all SCCP users. */ -int bsc_sccp_inst_next_conn_id(struct osmo_sccp_instance *sccp) +uint32_t bsc_sccp_inst_next_conn_id(struct osmo_sccp_instance *sccp) { static uint32_t next_id = 1; int i; + /* SUA: RFC3868 sec 3.10.4: + * The source reference number is a 4 octet long integer. + * This is allocated by the source SUA instance. + * M3UA/SCCP: ITU-T Q.713 sec 3.3: + * The "source local reference" parameter field is a three-octet field containing a + * reference number which is generated and used by the local node to identify the + * connection section after the connection section is set up. + * The coding "all ones" is reserved for future use. + * Hence, let's simply use 24 bit ids to fit all link types (excluding 0x00ffffff). + */ + /* This looks really suboptimal, but in most cases the static next_id should indicate exactly the next unused * conn_id, and we only iterate all conns once to make super sure that it is not already in use. */ - for (i = 0; i < 0xFFFFFF; i++) { + for (i = 0; i < SCCP_CONN_ID_MAX; i++) { struct gsm_subscriber_connection *conn; uint32_t conn_id = next_id; bool conn_id_already_used = false; - next_id = (next_id + 1) & 0xffffff; + + /* Optimized modulo operation (% SCCP_CONN_ID_MAX) using bitwise AND plus CMP: */ + next_id = (next_id + 1) & 0x00FFFFFF; + if (OSMO_UNLIKELY(next_id == 0x00FFFFFF)) + next_id = 0; llist_for_each_entry(conn, &bsc_gsmnet->subscr_conns, entry) { if (conn->sccp.msc && conn->sccp.msc->a.sccp == sccp) { @@ -60,5 +77,5 @@ if (!conn_id_already_used) return conn_id; } - return -1; + return SCCP_CONN_ID_UNSET; }
View file
osmo-bsc_1.10.0.81.6b20.tar.xz/src/osmo-bsc/bsc_subscr_conn_fsm.c -> osmo-bsc_1.10.0.84.895826.tar.xz/src/osmo-bsc/bsc_subscr_conn_fsm.c
Changed
@@ -1226,8 +1226,7 @@ conn->network = net; INIT_LLIST_HEAD(&conn->dtap_queue); INIT_LLIST_HEAD(&conn->hodec2.penalty_timers); - conn->sccp.conn_id = -1; - + conn->sccp.conn_id = SCCP_CONN_ID_UNSET; /* Default clear cause (on RR translates to GSM48_RR_CAUSE_ABNORMAL_UNSPEC) */ conn->clear_cause = GSM0808_CAUSE_EQUIPMENT_FAILURE;
View file
osmo-bsc_1.10.0.81.6b20.tar.xz/src/osmo-bsc/lb.c -> osmo-bsc_1.10.0.84.895826.tar.xz/src/osmo-bsc/lb.c
Changed
@@ -32,7 +32,7 @@ #include <osmocom/bsc/lcs_loc_req.h> #include <osmocom/bsc/bssmap_reset.h> -static struct gsm_subscriber_connection *get_bsc_conn_by_lb_conn_id(int conn_id) +static struct gsm_subscriber_connection *get_bsc_conn_by_lb_conn_id(uint32_t conn_id) { struct gsm_subscriber_connection *conn; @@ -229,7 +229,7 @@ static int lb_open_conn(struct gsm_subscriber_connection *conn, struct msgb *msg) { struct osmo_ss7_instance *ss7; - int conn_id; + uint32_t conn_id; int rc; OSMO_ASSERT(conn); @@ -242,14 +242,14 @@ } conn_id = bsc_sccp_inst_next_conn_id(bsc_gsmnet->smlc->sccp); - if (conn_id < 0) { + if (conn_id == SCCP_CONN_ID_UNSET) { LOGPFSMSL(conn->fi, DLCS, LOGL_ERROR, "Unable to allocate SCCP Connection ID for BSSMAP-LE to SMLC\n"); return -ENOSPC; } conn->lcs.lb.conn_id = conn_id; ss7 = osmo_ss7_instance_find(bsc_gsmnet->smlc->cs7_instance); OSMO_ASSERT(ss7); - LOGPFSMSL(conn->fi, DLCS, LOGL_INFO, "Opening new SCCP connection (id=%i) to SMLC: %s\n", conn_id, + LOGPFSMSL(conn->fi, DLCS, LOGL_INFO, "Opening new SCCP connection (id=%u) to SMLC: %s\n", conn_id, osmo_sccp_addr_name(ss7, &bsc_gsmnet->smlc->smlc_addr)); rc = osmo_sccp_tx_conn_req_msg(bsc_gsmnet->smlc->sccp_user, conn_id, &bsc_gsmnet->smlc->bsc_addr,
View file
osmo-bsc_1.10.0.81.6b20.tar.xz/src/osmo-bsc/osmo_bsc_sigtran.c -> osmo-bsc_1.10.0.84.895826.tar.xz/src/osmo-bsc/osmo_bsc_sigtran.c
Changed
@@ -46,14 +46,18 @@ #define DEFAULT_ASP_REMOTE_IP "localhost" /* Helper function to Check if the given connection id is already assigned */ -static struct gsm_subscriber_connection *get_bsc_conn_by_conn_id(int conn_id) +static struct gsm_subscriber_connection *get_bsc_conn_by_conn_id(const struct osmo_sccp_user *scu, uint32_t conn_id) { - conn_id &= 0xFFFFFF; + conn_id &= SCCP_CONN_ID_MAX; struct gsm_subscriber_connection *conn; + const struct osmo_sccp_instance *sccp = osmo_sccp_get_sccp(scu); llist_for_each_entry(conn, &bsc_gsmnet->subscr_conns, entry) { - if (conn->sccp.conn_id == conn_id) - return conn; + if (conn->sccp.msc && conn->sccp.msc->a.sccp != sccp) + continue; + if (conn->sccp.conn_id != conn_id) + continue; + return conn; } return NULL; @@ -167,7 +171,7 @@ struct gsm_subscriber_connection *conn; int rc = 0; - conn = get_bsc_conn_by_conn_id(scu_prim->u.connect.conn_id); + conn = get_bsc_conn_by_conn_id(scu, scu_prim->u.connect.conn_id); if (conn) { LOGP(DMSC, LOGL_NOTICE, "(calling_addr=%s conn_id=%u) N-CONNECT.ind with already used conn_id, ignoring\n", @@ -231,7 +235,7 @@ /* Handle outbound connection confirmation */ DEBUGP(DMSC, "N-CONNECT.cnf(%u, %s)\n", scu_prim->u.connect.conn_id, osmo_hexdump(msgb_l2(oph->msg), msgb_l2len(oph->msg))); - conn = get_bsc_conn_by_conn_id(scu_prim->u.connect.conn_id); + conn = get_bsc_conn_by_conn_id(scu, scu_prim->u.connect.conn_id); if (conn) { osmo_fsm_inst_dispatch(conn->fi, GSCON_EV_A_CONN_CFM, scu_prim); conn->sccp.state = SUBSCR_SCCP_ST_CONNECTED; @@ -250,7 +254,7 @@ osmo_hexdump(msgb_l2(oph->msg), msgb_l2len(oph->msg))); /* Incoming data is a sign of a vital connection */ - conn = get_bsc_conn_by_conn_id(scu_prim->u.data.conn_id); + conn = get_bsc_conn_by_conn_id(scu, scu_prim->u.data.conn_id); if (conn) { a_reset_conn_success(conn->sccp.msc); handle_data_from_msc(conn, oph->msg); @@ -262,7 +266,7 @@ osmo_hexdump(msgb_l2(oph->msg), msgb_l2len(oph->msg)), scu_prim->u.disconnect.cause); /* indication of disconnect */ - conn = get_bsc_conn_by_conn_id(scu_prim->u.disconnect.conn_id); + conn = get_bsc_conn_by_conn_id(scu, scu_prim->u.disconnect.conn_id); if (conn) { conn->sccp.state = SUBSCR_SCCP_ST_NONE; if (msgb_l2len(oph->msg) > 0) @@ -317,13 +321,13 @@ { struct osmo_ss7_instance *ss7; struct bsc_msc_data *msc; - int conn_id; + uint32_t conn_id; int rc; OSMO_ASSERT(conn); OSMO_ASSERT(msg); OSMO_ASSERT(conn->sccp.msc); - OSMO_ASSERT(conn->sccp.conn_id == -1); + OSMO_ASSERT(conn->sccp.conn_id == SCCP_CONN_ID_UNSET); msc = conn->sccp.msc; @@ -333,14 +337,14 @@ } conn->sccp.conn_id = conn_id = bsc_sccp_inst_next_conn_id(conn->sccp.msc->a.sccp); - if (conn->sccp.conn_id < 0) { + if (conn->sccp.conn_id == SCCP_CONN_ID_UNSET) { LOGP(DMSC, LOGL_ERROR, "Unable to allocate SCCP Connection ID\n"); return -1; } - LOGP(DMSC, LOGL_DEBUG, "Allocated new connection id: %d\n", conn->sccp.conn_id); + LOGP(DMSC, LOGL_DEBUG, "Allocated new connection id: %u\n", conn->sccp.conn_id); ss7 = osmo_ss7_instance_find(msc->a.cs7_instance); OSMO_ASSERT(ss7); - LOGP(DMSC, LOGL_INFO, "Opening new SCCP connection (id=%i) to MSC %d: %s\n", conn_id, + LOGP(DMSC, LOGL_INFO, "Opening new SCCP connection (id=%u) to MSC %d: %s\n", conn_id, msc->nr, osmo_sccp_addr_name(ss7, &msc->a.msc_addr)); rc = osmo_sccp_tx_conn_req_msg(msc->a.sccp_user, conn_id, &msc->a.bsc_addr,
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
.