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 3
View file
osmo-hnbgw.spec
Changed
@@ -18,13 +18,13 @@ Name: osmo-hnbgw Requires: osmocom-master -Version: 1.3.0.39.25cd +Version: 1.3.0.41.1906 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.3.0.39.25cd.tar.xz +Source: osmo-hnbgw_1.3.0.41.1906.tar.xz Source1: rpmlintrc BuildRequires: automake >= 1.9 BuildRequires: libtool >= 2
View file
commit_1906a30ca9acb0f422abf7dd1d3dea7ee9bd60f5.txt
Added
View file
commit_25cd41f3b556410fab7291b0f916754a3a3e5198.txt
Deleted
View file
osmo-hnbgw_1.3.0.39.25cd.dsc -> osmo-hnbgw_1.3.0.41.1906.dsc
Changed
@@ -2,7 +2,7 @@ Source: osmo-hnbgw Binary: osmo-hnbgw, osmo-hnbgw-dbg, osmo-hnbgw-doc Architecture: any all -Version: 1.3.0.39.25cd +Version: 1.3.0.41.1906 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: - 75c42a40db732e6ca663f41f0b9905a150417f6f 71504 osmo-hnbgw_1.3.0.39.25cd.tar.xz + 286a8a5720ac444995095ab829e0be38dcec7ab7 71832 osmo-hnbgw_1.3.0.41.1906.tar.xz Checksums-Sha256: - f915cc9f3b524262ddf610f6b46808c4aeb4d955d8105fd2087b143306326372 71504 osmo-hnbgw_1.3.0.39.25cd.tar.xz + 8b7ace478595e5d56a3f751dde870476a01ac3710ea8b12c9fe3b1812f281c47 71832 osmo-hnbgw_1.3.0.41.1906.tar.xz Files: - 19989c09612f7512bc68f3bdee46c498 71504 osmo-hnbgw_1.3.0.39.25cd.tar.xz + 7e6af8cbed6759066c656e3b9501b257 71832 osmo-hnbgw_1.3.0.41.1906.tar.xz
View file
osmo-hnbgw_1.3.0.39.25cd.tar.xz/.tarball-version -> osmo-hnbgw_1.3.0.41.1906.tar.xz/.tarball-version
Changed
@@ -1 +1 @@ -1.3.0.39-25cd +1.3.0.41-1906
View file
osmo-hnbgw_1.3.0.39.25cd.tar.xz/debian/changelog -> osmo-hnbgw_1.3.0.41.1906.tar.xz/debian/changelog
Changed
@@ -1,8 +1,8 @@ -osmo-hnbgw (1.3.0.39.25cd) unstable; urgency=medium +osmo-hnbgw (1.3.0.41.1906) unstable; urgency=medium * Automatically generated changelog entry for building the Osmocom master feed - -- Osmocom OBS scripts <info@osmocom.org> Tue, 27 Sep 2022 14:18:41 +0000 + -- Osmocom OBS scripts <info@osmocom.org> Fri, 30 Sep 2022 16:10:51 +0000 osmo-hnbgw (1.3.0) unstable; urgency=medium
View file
osmo-hnbgw_1.3.0.39.25cd.tar.xz/src/osmo-hnbgw/hnbgw.c -> osmo-hnbgw_1.3.0.41.1906.tar.xz/src/osmo-hnbgw/hnbgw.c
Changed
@@ -262,15 +262,15 @@ LOGHNB(hnb, DMAIN, LOGL_NOTICE, "HNB SCTP conn RESTARTed, marking as HNBAP-unregistered\n"); hnb->hnb_registered = false; break; - case SCTP_SHUTDOWN_EVENT: - LOGHNB(hnb, DMAIN, LOGL_NOTICE, - "sctp_recvmsg(%s) = SCTP_SHUTDOWN_EVENT, closing conn\n", - osmo_sock_get_name2(osmo_stream_srv_get_ofd(conn)->fd)); - osmo_stream_srv_destroy(conn); - rc = -1; - break; } break; + case SCTP_SHUTDOWN_EVENT: + LOGHNB(hnb, DMAIN, LOGL_NOTICE, + "sctp_recvmsg(%s) = SCTP_SHUTDOWN_EVENT, closing conn\n", + osmo_sock_get_name2(osmo_stream_srv_get_ofd(conn)->fd)); + osmo_stream_srv_destroy(conn); + rc = -1; + break; } goto out; } else if (rc == -EAGAIN) {
View file
osmo-hnbgw_1.3.0.39.25cd.tar.xz/src/osmo-hnbgw/hnbgw_hnbap.c -> osmo-hnbgw_1.3.0.41.1906.tar.xz/src/osmo-hnbgw/hnbgw_hnbap.c
Changed
@@ -395,7 +395,7 @@ static int hnbgw_rx_hnb_register_req(struct hnb_context *ctx, ANY_t *in) { - struct hnb_context *hnb; + struct hnb_context *hnb, *tmp; HNBAP_HNBRegisterRequestIEs_t ies; int rc; struct osmo_plmn_id plmn; @@ -422,8 +422,35 @@ ctx->id.mcc = plmn.mcc; ctx->id.mnc = plmn.mnc; - llist_for_each_entry(hnb, &ctx->gw->hnb_list, list) { + llist_for_each_entry_safe(hnb, tmp, &ctx->gw->hnb_list, list) { if (hnb->hnb_registered && ctx != hnb && memcmp(&ctx->id, &hnb->id, sizeof(ctx->id)) == 0) { + /* If it's coming from the same remote IP addr+port, then it must be our internal + * fault (bug), and we release the old context to keep going... */ + struct osmo_fd *other_fd = osmo_stream_srv_get_ofd(hnb->conn); + struct osmo_sockaddr other_osa = {}; + struct osmo_sockaddr cur_osa = {}; + socklen_t len = sizeof(other_osa); + if (getpeername(other_fd->fd, &other_osa.u.sa, &len) < 0) { + LOGHNB(ctx, DHNBAP, LOGL_ERROR, "BUG! Found old registered HNB with invalid socket, releasing it\n"); + hnb_context_release(hnb); + continue; + } + len = sizeof(cur_osa); + if (getpeername(ofd->fd, &cur_osa.u.sa, &len) < 0) { + LOGHNB(ctx, DHNBAP, LOGL_ERROR, "Error getpeername(): %s\n", strerror(errno)); + if (osmo_sockaddr_cmp(&cur_osa, &other_osa) == 0) { + LOGHNB(ctx, DHNBAP, LOGL_ERROR, "BUG! Found old registered HNB with same remote address, releasing it\n"); + hnb_context_release(hnb); + continue; + } + } else if (osmo_sockaddr_cmp(&cur_osa, &other_osa) == 0) { + LOGHNB(ctx, DHNBAP, LOGL_ERROR, "BUG! Found old registered HNB with same remote address, releasing it\n"); + hnb_context_release(hnb); + continue; + } /* else: addresses are different, we continue below */ + + /* If new conn registering same HNB is from anoter remote addr+port, let's reject it to avoid + * misconfigurations or someone trying to impersonate an already working HNB: */ LOGHNB(ctx, DHNBAP, LOGL_ERROR, "rejecting HNB-REGISTER-REQ with duplicate cell identity " "MCC=%u,MNC=%u,LAC=%u,RAC=%u,SAC=%u,CID=%u from %s\n", ctx->id.mcc, ctx->id.mnc, ctx->id.lac, ctx->id.rac, ctx->id.sac, ctx->id.cid, name);
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
.