osmith has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmo-abis/+/38982?usp=email )
Change subject: debian: libosmo-abis-dev dep on libosmo-netif-dev
......................................................................
debian: libosmo-abis-dev dep on libosmo-netif-dev
Let libosmo-netif-dev depend on libosmo-abis-dev, so libosmoabis.pc is
available when using libosmonetif.pc (which now references
libosmoabis.pc).
Without this, osmo-pcu and osmo-remsim fail to build:
checking for libosmoabis >= 1.6.0... no
configure: error: Package requirements (libosmoabis >= 1.6.0) were not met:
Package 'libosmo-netif', required by 'libosmoabis', not found
Fixes: 258dcf71 ("ipaccess: Convert BTS OML & RSL link to use stream_cli")
Change-Id: I06031417406b4b3187eb9c7ed8b509e97e03bb7f
---
M debian/control
1 file changed, 4 insertions(+), 1 deletion(-)
git pull ssh://gerrit.osmocom.org:29418/libosmo-abis refs/changes/82/38982/1
diff --git a/debian/control b/debian/control
index 72aed59..80c2fea 100644
--- a/debian/control
+++ b/debian/control
@@ -2,6 +2,8 @@
Maintainer: Osmocom team <openbsc(a)lists.osmocom.org>
Section: libs
Priority: optional
+# NOTE: libosmo-netif-dev is also in Depends of libosmo-abis-dev below,
+# as libosmoabis.pc.in has "Requires.private: libosmo-netif"
Build-Depends: debhelper (>= 10),
autotools-dev,
autoconf,
@@ -61,7 +63,8 @@
Section: libdevel
Depends: ${misc:Depends},
libosmotrau10 (= ${binary:Version}),
- libosmoabis13 (= ${binary:Version})
+ libosmoabis13 (= ${binary:Version}),
+ libosmo-netif-dev (>= 1.5.0),
Description: Development headers for A-bis interface
The libosmo-abis library contains common/shared code regarding the A-bis
interface between GSM BTS and BSC. This package in particular contains the
--
To view, visit https://gerrit.osmocom.org/c/libosmo-abis/+/38982?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: newchange
Gerrit-Project: libosmo-abis
Gerrit-Branch: master
Gerrit-Change-Id: I06031417406b4b3187eb9c7ed8b509e97e03bb7f
Gerrit-Change-Number: 38982
Gerrit-PatchSet: 1
Gerrit-Owner: osmith <osmith(a)sysmocom.de>
pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-bsc/+/38981?usp=email )
Change subject: ipaccess-proxy: Fix wrong cb function passed
......................................................................
ipaccess-proxy: Fix wrong cb function passed
It makes no sense that ipaccess-proxy is using the ipaccess_fd_cb()
function from libosmo-abis, since that function expects an e1_input
ipaccess driver to be set up by the app, which ipaccess-proxy never sets
up. Furthermore, even the data pointer being passed doesn't match the
one expected by the callback.
This seems to be a bug introduced 10 years ago in osmo-bsc.git
eb623019382fdbff36fb8a72052732e225aef67e, where the name of the private
function callback used by ipaccess-proxy was changed to
proxy_ipaccess_fd_cb() to avoid colliding with the ipaccess_fd_cb() from
libosmo-abis, but only 1 of the 2 references was changed at the time,
leaving the other one pointing to the wrong function.
Fixes: eb623019382fdbff36fb8a72052732e225aef67e
Change-Id: I1702d9913a462a36e4b78b503a8338ae2ad140b1
---
M src/ipaccess/ipaccess-proxy.c
1 file changed, 1 insertion(+), 1 deletion(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/81/38981/1
diff --git a/src/ipaccess/ipaccess-proxy.c b/src/ipaccess/ipaccess-proxy.c
index 7ede283..62e79cd 100644
--- a/src/ipaccess/ipaccess-proxy.c
+++ b/src/ipaccess/ipaccess-proxy.c
@@ -1021,7 +1021,7 @@
}
bfd = &ipc->fd;
- osmo_fd_setup(bfd, ret, OSMO_FD_READ | OSMO_FD_WRITE, ipaccess_fd_cb, ipc, priv_nr);
+ osmo_fd_setup(bfd, ret, OSMO_FD_READ | OSMO_FD_WRITE, proxy_ipaccess_fd_cb, ipc, priv_nr);
ret = setsockopt(bfd->fd, SOL_SOCKET, SO_REUSEADDR, &on, sizeof(on));
if (ret < 0) {
--
To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/38981?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: newchange
Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: I1702d9913a462a36e4b78b503a8338ae2ad140b1
Gerrit-Change-Number: 38981
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
pespin has submitted this change. ( https://gerrit.osmocom.org/c/osmo-bsc/+/38968?usp=email )
Change subject: abis: Fix reusing bts->*_link while it is being destroyed
......................................................................
abis: Fix reusing bts->*_link while it is being destroyed
Call to e1inp_sign_link_destroy() may trigger a sign_down() callback,
which if happening synchronously, could end up reentring the same code
path we are in before bts->*_link was set to NULL.
Avoid it by marking the pointer as NULL immediatelly before calling
e1inp_sign_link_destroy().
Change-Id: Ice71b3143f167482e4a23759012b58e9ee13bfc0
---
M src/osmo-bsc/bts_ipaccess_nanobts.c
1 file changed, 13 insertions(+), 3 deletions(-)
Approvals:
osmith: Looks good to me, but someone else must approve
laforge: Looks good to me, approved
Jenkins Builder: Verified
diff --git a/src/osmo-bsc/bts_ipaccess_nanobts.c b/src/osmo-bsc/bts_ipaccess_nanobts.c
index b0532e5..9382fa4 100644
--- a/src/osmo-bsc/bts_ipaccess_nanobts.c
+++ b/src/osmo-bsc/bts_ipaccess_nanobts.c
@@ -508,12 +508,17 @@
/* These are exported because they are used by the VTY interface. */
void ipaccess_drop_rsl(struct gsm_bts_trx *trx, const char *reason)
{
+ struct e1inp_sign_link *link;
+
if (!trx->rsl_link_primary)
return;
LOG_TRX(trx, DLINP, LOGL_NOTICE, "Dropping RSL link: %s\n", reason);
- e1inp_sign_link_destroy(trx->rsl_link_primary);
+ /* Mark bts->rsl_link_primary ptr null before calling sign_link_destroy,
+ * to avoid a callback triggering this same code path. */
+ link = trx->rsl_link_primary;
trx->rsl_link_primary = NULL;
+ e1inp_sign_link_destroy(link);
osmo_stat_item_dec(osmo_stat_item_group_get_item(trx->bts->bts_statg, BTS_STAT_RSL_CONNECTED), 1);
if (trx->bts->c0 == trx)
@@ -529,6 +534,7 @@
uint8_t i;
struct timespec tp;
int rc;
+ struct e1inp_sign_link *link;
/* First of all, remove deferred drop if enabled */
osmo_timer_del(&bts->oml_drop_link_timer);
@@ -537,8 +543,11 @@
return;
LOG_BTS(bts, DLINP, LOGL_NOTICE, "Dropping OML link: %s\n", reason);
- e1inp_sign_link_destroy(bts->oml_link);
+ /* Mark bts->oml_link ptr null before calling sign_link_destroy,
+ * to avoid a callback triggering this same code path. */
+ link = bts->oml_link;
bts->oml_link = NULL;
+ e1inp_sign_link_destroy(link);
rc = osmo_clock_gettime(CLOCK_MONOTONIC, &tp);
bts->updowntime = (rc < 0) ? 0 : tp.tv_sec; /* we don't need sub-second precision for downtime */
osmo_stat_item_dec(osmo_stat_item_group_get_item(bts->bts_statg, BTS_STAT_OML_CONNECTED), 1);
@@ -546,8 +555,9 @@
/* Also drop the associated OSMO link */
OSMO_ASSERT(bts->osmo_link);
- e1inp_sign_link_destroy(bts->osmo_link);
+ link = bts->osmo_link;
bts->osmo_link = NULL;
+ e1inp_sign_link_destroy(link);
bts_setup_ramp_remove(bts);
--
To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/38968?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: merged
Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: Ice71b3143f167482e4a23759012b58e9ee13bfc0
Gerrit-Change-Number: 38968
Gerrit-PatchSet: 2
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: daniel <dwillmann(a)sysmocom.de>
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Attention is currently required from: daniel, fixeria, pespin.
laforge has posted comments on this change by pespin. ( https://gerrit.osmocom.org/c/osmo-bsc/+/38968?usp=email )
Change subject: abis: Fix reusing bts->*_link while it is being destroyed
......................................................................
Patch Set 2: Code-Review+2
--
To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/38968?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: Ice71b3143f167482e4a23759012b58e9ee13bfc0
Gerrit-Change-Number: 38968
Gerrit-PatchSet: 2
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: daniel <dwillmann(a)sysmocom.de>
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Attention: daniel <dwillmann(a)sysmocom.de>
Gerrit-Comment-Date: Fri, 29 Nov 2024 11:49:12 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
pespin has submitted this change. ( https://gerrit.osmocom.org/c/osmo-cbc/+/38978?usp=email )
Change subject: abis: Fix reusing link->conn while it is being destroyed
......................................................................
abis: Fix reusing link->conn while it is being destroyed
Call to osmo_stream_cli_destroy() may end up triggering disconnect_cb(),
and we don't want to attempt doing more stuff with that conn when that
happens (we were even trying to reconnect() it...).
Avoid it by marking the pointer as NULL immediatelly before calling
e1inp_sign_link_destroy().
Change-Id: I56605766af974d86610d0958f4b82e6e4ff94502
---
M src/cbsp_link.c
1 file changed, 5 insertions(+), 2 deletions(-)
Approvals:
osmith: Looks good to me, but someone else must approve
fixeria: Looks good to me, approved
Jenkins Builder: Verified
diff --git a/src/cbsp_link.c b/src/cbsp_link.c
index 07fbadd..6b355df 100644
--- a/src/cbsp_link.c
+++ b/src/cbsp_link.c
@@ -102,6 +102,8 @@
static int cbc_cbsp_link_cli_disconnect_cb(struct osmo_stream_cli *conn)
{
struct cbc_cbsp_link *link = osmo_stream_cli_get_data(conn);
+ if (!link->conn) /* conn is being destroyed by us, we called osmo_stream_cli_destroy() */
+ return 0;
LOGPCC(link, LOGL_NOTICE, "Disconnected.\n");
LOGPCC(link, LOGL_NOTICE, "Reconnecting...\n");
osmo_stream_cli_reconnect(conn);
@@ -364,10 +366,11 @@
return;
if (link->is_client) {
- osmo_stream_cli_destroy(link->cli_conn);
+ struct osmo_stream_cli *cli_conn = link->cli_conn;
+ link->cli_conn = NULL;
+ osmo_stream_cli_destroy(cli_conn);
if (link->peer)
link->peer->link.cbsp = NULL;
- link->cli_conn = NULL;
if (link->fi)
osmo_fsm_inst_dispatch(link->fi, CBSP_LINK_E_CMD_CLOSE, NULL);
} else {
--
To view, visit https://gerrit.osmocom.org/c/osmo-cbc/+/38978?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: merged
Gerrit-Project: osmo-cbc
Gerrit-Branch: master
Gerrit-Change-Id: I56605766af974d86610d0958f4b82e6e4ff94502
Gerrit-Change-Number: 38978
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: daniel <dwillmann(a)sysmocom.de>
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Attention is currently required from: daniel, laforge, pespin.
fixeria has posted comments on this change by pespin. ( https://gerrit.osmocom.org/c/osmo-cbc/+/38978?usp=email )
Change subject: abis: Fix reusing link->conn while it is being destroyed
......................................................................
Patch Set 1: Code-Review+2
--
To view, visit https://gerrit.osmocom.org/c/osmo-cbc/+/38978?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: osmo-cbc
Gerrit-Branch: master
Gerrit-Change-Id: I56605766af974d86610d0958f4b82e6e4ff94502
Gerrit-Change-Number: 38978
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: daniel <dwillmann(a)sysmocom.de>
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
Gerrit-Attention: laforge <laforge(a)osmocom.org>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: daniel <dwillmann(a)sysmocom.de>
Gerrit-Comment-Date: Fri, 29 Nov 2024 10:59:41 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes