aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPau Espin Pedrol <pespin@sysmocom.de>2022-09-15 18:53:07 +0200
committerPau Espin Pedrol <pespin@sysmocom.de>2022-09-16 20:56:00 +0200
commitcd3d71b31885a8e05096de0bc0711d3c615e8d47 (patch)
treeb10001d42f7ba77d0ec1bd3ec48b7e86cd984297
parente826d783993d596f8a4557f850eda24fe2a2ea5a (diff)
abis: Avoid TCP/IPA RSL sockets continue conn establishment while shutting down
when something fails in osmo-bts during startup and it goes into SHUTDOWN state, it is desirable to close new RSL links (sockets) which are in progress to connect, while it waits for a while to complete shutdown (power ramping down, etc.). This way we don't end up with new interactions and new state against a BSC if we are shutting down. The new libosmo-abis API is used since the higher layer struct e1inp_sign_link assigned to each struct gsm_bts_trx is not provided to the osmo-bts code layer by libosmo-abis API until the TCP+IPA handshake in the socket becomes fully established (sign_link_up() callback). Depends: libosmo-abis.git Ia6418321f3b6f1f7274efd414625a4b10a09a362 Change-Id: I599d074f51f490b43c9a89b105d1823391926947
-rw-r--r--TODO-RELEASE1
-rw-r--r--src/common/abis.c8
2 files changed, 9 insertions, 0 deletions
diff --git a/TODO-RELEASE b/TODO-RELEASE
index c91d81cd..d0ab49f3 100644
--- a/TODO-RELEASE
+++ b/TODO-RELEASE
@@ -9,3 +9,4 @@
#library what description / commit summary line
libosmocore >1.7.0 BTS_FEAT_OSMUX, RSL_IE_OSMO_OSMUX_CID
libosmo-netif >1.2.0 OSMUX_DEFAULT_PORT
+libosmo-abis >1.3.0 e1inp_ipa_bts_rsl_close_n()
diff --git a/src/common/abis.c b/src/common/abis.c
index 4afe81af..10eeafff 100644
--- a/src/common/abis.c
+++ b/src/common/abis.c
@@ -230,6 +230,14 @@ static void abis_link_connected(struct osmo_fsm_inst *fi, uint32_t event, void *
trx->rsl_link = NULL;
if (trx == trx->bts->c0)
load_timer_stop(trx->bts);
+ } else {
+ /* If we have no rsl_link yet it may mean that lower
+ * layers are still establishing the socket (TCP, IPA).
+ * Let's tell it to stop connection establishment since
+ * we are shutting down. */
+ struct e1inp_line *line = e1inp_line_find(0);
+ if (line)
+ e1inp_ipa_bts_rsl_close_n(line, trx->nr);
}
/* Note: Here we could send NM_EV_RSL_DOWN to each
* trx->(bb_transc.)mo.fi, but we are starting shutdown of the