Projects
osmocom:master
osmo-hnbgw
Sign Up
Log In
Username
Password
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
Expand all
Collapse all
Changes of Revision 104
View file
commit_00655d45dd8bdd8276f7eb369405b5404074d250.txt
Added
View file
commit_e29816eccca01c27e58c7247a79bb3df7ddcf741.txt
Deleted
View file
osmo-hnbgw_1.5.0.78.e298.dsc -> osmo-hnbgw_1.5.0.80.0065.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.78.e298 +Version: 1.5.0.80.0065 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: - d7b145f473ad890546ff81dbef346d75afde0617 119276 osmo-hnbgw_1.5.0.78.e298.tar.xz + 031b728656c021e7213719f4a7b6ccd9bfbe9610 118600 osmo-hnbgw_1.5.0.80.0065.tar.xz Checksums-Sha256: - 15e8cadf966831bcd5351900ba13c5699461ea1e28cada649b97ada562dee16f 119276 osmo-hnbgw_1.5.0.78.e298.tar.xz + 72eb95d812f0a057c438dac66c8b8f7cb6337aefc5bc066e93a580cc456dd512 118600 osmo-hnbgw_1.5.0.80.0065.tar.xz Files: - f9f1ed0a2a0a053834b4e625033ec1cc 119276 osmo-hnbgw_1.5.0.78.e298.tar.xz + ed715dc555eeb48a0349ee8bc168497d 118600 osmo-hnbgw_1.5.0.80.0065.tar.xz
View file
osmo-hnbgw_1.5.0.78.e298.tar.xz/.tarball-version -> osmo-hnbgw_1.5.0.80.0065.tar.xz/.tarball-version
Changed
@@ -1 +1 @@ -1.5.0.78-e298 +1.5.0.80-0065
View file
osmo-hnbgw_1.5.0.78.e298.tar.xz/debian/changelog -> osmo-hnbgw_1.5.0.80.0065.tar.xz/debian/changelog
Changed
@@ -1,8 +1,8 @@ -osmo-hnbgw (1.5.0.78.e298) unstable; urgency=medium +osmo-hnbgw (1.5.0.80.0065) unstable; urgency=medium * Automatically generated changelog entry for building the Osmocom master feed - -- Osmocom OBS scripts <info@osmocom.org> Wed, 12 Jun 2024 02:41:13 +0000 + -- Osmocom OBS scripts <info@osmocom.org> Sat, 15 Jun 2024 02:55:26 +0000 osmo-hnbgw (1.5.0) unstable; urgency=medium
View file
osmo-hnbgw_1.5.0.78.e298.tar.xz/include/osmocom/hnbgw/hnbgw.h -> osmo-hnbgw_1.5.0.80.0065.tar.xz/include/osmocom/hnbgw/hnbgw.h
Changed
@@ -470,8 +470,6 @@ DECLARE_HASHTABLE(hnb_persistent_by_id, 5); struct osmo_timer_list store_uptime_timer; - /* list of struct ue_context */ - struct llist_head ue_list; /* next availble UE Context ID */ uint32_t next_ue_ctx_id; struct ctrl_handle *ctrl; @@ -516,13 +514,6 @@ struct hnb_context *hnb_context_by_identity_info(const char *identity_info); const char *hnb_context_name(struct hnb_context *ctx); -struct ue_context *ue_context_by_id(uint32_t id); -struct ue_context *ue_context_by_imsi(const char *imsi); -struct ue_context *ue_context_by_tmsi(uint32_t tmsi); -struct ue_context *ue_context_alloc(struct hnb_context *hnb, const char *imsi, - uint32_t tmsi); -void ue_context_free(struct ue_context *ue); - void hnb_context_release(struct hnb_context *ctx); void hnb_context_release_ue_state(struct hnb_context *ctx); @@ -550,3 +541,5 @@ int hnbgw_peek_l3_ul(struct hnbgw_context_map *map, struct msgb *ranap_msg); unsigned long long hnb_get_updowntime(const struct hnb_context *ctx); + +uint32_t get_next_ue_ctx_id(void);
View file
osmo-hnbgw_1.5.0.78.e298.tar.xz/src/osmo-hnbgw/hnbgw.c -> osmo-hnbgw_1.5.0.80.0065.tar.xz/src/osmo-hnbgw/hnbgw.c
Changed
@@ -94,91 +94,11 @@ * UE Context ***********************************************************************/ -struct ue_context *ue_context_by_id(uint32_t id) +uint32_t get_next_ue_ctx_id(void) { - struct ue_context *ue; - - llist_for_each_entry(ue, &g_hnbgw->ue_list, list) { - if (ue->context_id == id) - return ue; - } - return NULL; - -} - -struct ue_context *ue_context_by_imsi(const char *imsi) -{ - struct ue_context *ue; - - llist_for_each_entry(ue, &g_hnbgw->ue_list, list) { - if (!strcmp(ue->imsi, imsi)) - return ue; - } - return NULL; -} - -struct ue_context *ue_context_by_tmsi(uint32_t tmsi) -{ - struct ue_context *ue; - - llist_for_each_entry(ue, &g_hnbgw->ue_list, list) { - if (ue->tmsi == tmsi) - return ue; - } - return NULL; -} - -static void ue_context_free_by_hnb(const struct hnb_context *hnb) -{ - struct ue_context *ue, *tmp; - - llist_for_each_entry_safe(ue, tmp, &g_hnbgw->ue_list, list) { - if (ue->hnb == hnb) - ue_context_free(ue); - } -} - -static uint32_t get_next_ue_ctx_id(void) -{ - uint32_t id; - - do { - id = g_hnbgw->next_ue_ctx_id++; - } while (ue_context_by_id(id)); - - return id; + return g_hnbgw->next_ue_ctx_id++; } -struct ue_context *ue_context_alloc(struct hnb_context *hnb, const char *imsi, - uint32_t tmsi) -{ - struct ue_context *ue; - - ue = talloc_zero(g_hnbgw, struct ue_context); - OSMO_ASSERT(ue); - - ue->hnb = hnb; - if (imsi) - OSMO_STRLCPY_ARRAY(ue->imsi, imsi); - else - ue->imsi0 = '\0'; - ue->tmsi = tmsi; - ue->context_id = get_next_ue_ctx_id(); - llist_add_tail(&ue->list, &g_hnbgw->ue_list); - - LOGP(DHNBAP, LOGL_INFO, "created UE context: id 0x%x, imsi %s, tmsi 0x%x\n", - ue->context_id, imsi? imsi : "-", tmsi); - - return ue; -} - -void ue_context_free(struct ue_context *ue) -{ - llist_del(&ue->list); - talloc_free(ue); -} - - /*********************************************************************** * HNB Context ***********************************************************************/ @@ -340,7 +260,6 @@ context_map_hnb_released(map); /* hnbgw_context_map will remove itself from lists when it is ready. */ } - ue_context_free_by_hnb(ctx); } void hnb_context_release(struct hnb_context *ctx) @@ -1068,7 +987,6 @@ INIT_LLIST_HEAD(&g_hnbgw->hnb_persistent_list); hash_init(g_hnbgw->hnb_persistent_by_id); - INIT_LLIST_HEAD(&g_hnbgw->ue_list); INIT_LLIST_HEAD(&g_hnbgw->sccp.users); g_hnbgw->mgw_pool = mgcp_client_pool_alloc(g_hnbgw);
View file
osmo-hnbgw_1.5.0.78.e298.tar.xz/src/osmo-hnbgw/hnbgw_hnbap.c -> osmo-hnbgw_1.5.0.80.0065.tar.xz/src/osmo-hnbgw/hnbgw_hnbap.c
Changed
@@ -171,7 +171,7 @@ } -static int hnbgw_tx_ue_register_acc(struct ue_context *ue) +static int hnbgw_tx_ue_register_acc(struct hnb_context *hnb, const char *imsi, uint32_t context_id) { HNBAP_UERegisterAccept_t accept_out; HNBAP_UERegisterAcceptIEs_t accept; @@ -182,21 +182,20 @@ int rc; encoded_imsi_len = ranap_imsi_encode(encoded_imsi, - sizeof(encoded_imsi), ue->imsi); + sizeof(encoded_imsi), imsi); memset(&accept, 0, sizeof(accept)); accept.uE_Identity.present = HNBAP_UE_Identity_PR_iMSI; OCTET_STRING_fromBuf(&accept.uE_Identity.choice.iMSI, (const char *)encoded_imsi, encoded_imsi_len); - asn1_u24_to_bitstring(&accept.context_ID, &ctx_id, ue->context_id); + asn1_u24_to_bitstring(&accept.context_ID, &ctx_id, context_id); memset(&accept_out, 0, sizeof(accept_out)); rc = hnbap_encode_ueregisteraccepties(&accept_out, &accept); ASN_STRUCT_FREE_CONTENTS_ONLY(asn_DEF_OCTET_STRING, &accept.uE_Identity.choice.iMSI); if (rc < 0) { - LOGHNB(ue->hnb, DHNBAP, LOGL_ERROR, - "Failed to encode HNBAP UE Register Accept message for UE IMSI-%s TMSI-0x%08x\n", - ue->imsi, ue->tmsi); + LOGHNB(hnb, DHNBAP, LOGL_ERROR, + "Failed to encode HNBAP UE Register Accept message for UE IMSI-%s\n", imsi); return rc; } @@ -207,11 +206,10 @@ ASN_STRUCT_FREE_CONTENTS_ONLY(asn_DEF_HNBAP_UERegisterAccept, &accept_out); - rc = hnbgw_hnbap_tx(ue->hnb, msg); + rc = hnbgw_hnbap_tx(hnb, msg); if (rc) - LOGHNB(ue->hnb, DHNBAP, LOGL_ERROR, - "Failed to enqueue HNBAP UE Register Accept message for UE IMSI-%s TMSI-0x%08x\n", - ue->imsi, ue->tmsi); + LOGHNB(hnb, DHNBAP, LOGL_ERROR, + "Failed to enqueue HNBAP UE Register Accept message for UE IMSI-%s\n", imsi); return rc; } @@ -350,8 +348,6 @@ struct msgb *msg; uint32_t ctx_id; uint32_t tmsi = 0; - struct ue_context *ue; - struct ue_context *ue_allocated = NULL; int rc; memset(&accept, 0, sizeof(accept)); @@ -397,11 +393,7 @@ tmsi = ntohl(tmsi); LOGHNB(hnb, DHNBAP, LOGL_DEBUG, "HNBAP register with TMSI %x\n", tmsi); - ue = ue_context_by_tmsi(tmsi); - if (!ue) - ue = ue_allocated = ue_context_alloc(hnb, NULL, tmsi); - - asn1_u24_to_bitstring(&accept.context_ID, &ctx_id, ue->context_id); + asn1_u24_to_bitstring(&accept.context_ID, &ctx_id, get_next_ue_ctx_id()); memset(&accept_out, 0, sizeof(accept_out)); rc = hnbap_encode_ueregisteraccepties(&accept_out, &accept); @@ -436,10 +428,6 @@ if (rc < 0) { LOGHNB(hnb, DHNBAP, LOGL_ERROR, "Failed to encode HNBAP UE Register Accept for TMSI 0x%08x\n", tmsi); /* Encoding failed. Nothing in 'accept_out'. */ - /* If we allocated the UE context but the UE REGISTER fails, get rid of it again: there will likely - * never be a UE DE-REGISTER for this UE from the HNB, and the ue_context would linger forever. */ - if (ue_allocated) - ue_context_free(ue_allocated); return rc; } @@ -592,8 +580,6 @@ { HNBAP_UERegisterRequestIEs_t ies; HNBAP_Cause_t cause; - struct ue_context *ue; - struct ue_context *ue_allocated = NULL; char imsiGSM23003_IMSI_MAX_DIGITS+1; int rc; @@ -650,23 +636,10 @@ LOGHNB(ctx, DHNBAP, LOGL_DEBUG, "UE-REGISTER-REQ ID_type=%d imsi=%s cause=%ld\n", ies.uE_Identity.present, imsi, ies.registration_Cause); - ue = ue_context_by_imsi(imsi); - if (!ue) - ue = ue_allocated = ue_context_alloc(ctx, imsi, 0); - else - LOGHNB(ctx, DHNBAP, LOGL_DEBUG, "UE context for IMSI %s already exists\n", imsi); - /* Send UERegisterAccept */ - rc = hnbgw_tx_ue_register_acc(ue); - if (rc < 0) { + rc = hnbgw_tx_ue_register_acc(ctx, imsi, get_next_ue_ctx_id()); + if (rc < 0) LOGHNB(ctx, DHNBAP, LOGL_ERROR, "Failed to transmit HNBAP UE Register Accept for IMSI %s\n", imsi); - /* If we allocated the UE context but the UE REGISTER fails, get rid of it again: there will likely - * never be a UE DE-REGISTER for this UE from the HNB, and the ue_context would linger forever. */ - if (ue_allocated) { - ue_context_free(ue_allocated); - LOGHNB(ctx, DHNBAP, LOGL_INFO, "Freed UE context for IMSI %s\n", imsi); - } - } free_and_return_rc: hnbap_free_ueregisterrequesties(&ies); return rc; @@ -676,7 +649,6 @@ { HNBAP_UEDe_RegisterIEs_t ies; HNBAP_Cause_t cause; - struct ue_context *ue; int rc; uint32_t ctxid; @@ -699,9 +671,6 @@ HNBAP_Criticality_ignore, HNBAP_TriggeringMessage_initiating_message); } else { LOGHNB(ctx, DHNBAP, LOGL_DEBUG, "UE-DE-REGISTER context=%u cause=%s\n", ctxid, hnbap_cause_str(&ies.cause)); - ue = ue_context_by_id(ctxid); - if (ue) - ue_context_free(ue); } hnbap_free_uede_registeries(&ies);
View file
osmo-hnbgw_1.5.0.78.e298.tar.xz/src/osmo-hnbgw/hnbgw_vty.c -> osmo-hnbgw_1.5.0.80.0065.tar.xz/src/osmo-hnbgw/hnbgw_vty.c
Changed
@@ -229,12 +229,6 @@ } } -static void vty_dump_ue_info(struct vty *vty, struct ue_context *ue) -{ - vty_out(vty, "UE IMSI \"%s\" context ID %u HNB %s%s", ue->imsi, ue->context_id, - hnb_context_name(ue->hnb), VTY_NEWLINE); -} - #define SHOW_HNB_STR SHOW_STR "Display information about HNB\n" DEFUN(show_hnb, show_hnb_cmd, "show hnb all", @@ -279,18 +273,6 @@ return CMD_SUCCESS; } -DEFUN(show_ue, show_ue_cmd, "show ue all", - SHOW_STR "Display HNBAP information about UE\n" "All UE\n") -{ - struct ue_context *ue; - - llist_for_each_entry(ue, &g_hnbgw->ue_list, list) { - vty_dump_ue_info(vty, ue); - } - - return CMD_SUCCESS; -} - DEFUN(show_talloc, show_talloc_cmd, "show talloc", SHOW_STR "Display talloc info") { talloc_report_full(g_hnbgw, stderr); @@ -1169,7 +1151,6 @@ install_element_ve(&show_cnlink_cmd); install_element_ve(&show_hnb_cmd); install_element_ve(&show_one_hnb_cmd); - install_element_ve(&show_ue_cmd); install_element_ve(&show_talloc_cmd); install_element(HNBGW_NODE, &cfg_hnbgw_mgcp_cmd);
View file
osmo-hnbgw_1.5.0.78.e298.tar.xz/src/osmo-hnbgw/nft_kpi.c -> osmo-hnbgw_1.5.0.80.0065.tar.xz/src/osmo-hnbgw/nft_kpi.c
Changed
@@ -983,7 +983,7 @@ struct hnb_persistent *hnbp = NULL; int count = 0; - LOGP(DNFT, LOGL_DEBUG, "main thread: updating %zu hnbp with rate counters from nft response\n", + LOGP(DNFT, LOGL_DEBUG, "main thread: updating %zu rate counters from nft response (2 counters per hNodeB)\n", req->get_counters.counters_len); for (; c < end; c++) { @@ -997,8 +997,8 @@ count++; } - LOGP(DNFT, LOGL_DEBUG, "main thread: rate counters for %d of %zu hnbp have incremented\n", count, - req->get_counters.counters_len); + LOGP(DNFT, LOGL_DEBUG, "main thread: %d of %zu rate counters have incremented (2 counters per hNodeB)\n", + count, req->get_counters.counters_len); } /* main thread: handle responses from a worker thread */
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
.