This is merely a historical archive of years 2008-2021, before the migration to mailman3.
A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.
pespin gerrit-no-reply at lists.osmocom.orgpespin has submitted this change. ( https://gerrit.osmocom.org/c/osmo-bts/+/25730 )
Change subject: nm_*_fsm: reset mo.nm_attr from previous runs when entering state NOT_INSTALLED
......................................................................
nm_*_fsm: reset mo.nm_attr from previous runs when entering state NOT_INSTALLED
Code in oml.c, upon receiving net attributes, merges the new attributes
with old ones (for some reason I don't really know). Hence, if we
disconnect from a BSC and go to NOT_INSTALLED state, we must free
previous nm_attr in order to avoid mixing them once we connect to a new
(potentially different) BSC upon reconnect.
Related: OS#5248
Change-Id: I45cc22dd68121a7930301581bfd0a8db37879c77
---
M src/common/nm_bb_transc_fsm.c
M src/common/nm_bts_fsm.c
M src/common/nm_channel_fsm.c
M src/common/nm_radio_carrier_fsm.c
4 files changed, 8 insertions(+), 0 deletions(-)
Approvals:
fixeria: Looks good to me, approved
Jenkins Builder: Verified
diff --git a/src/common/nm_bb_transc_fsm.c b/src/common/nm_bb_transc_fsm.c
index 40d5134..ca78256 100644
--- a/src/common/nm_bb_transc_fsm.c
+++ b/src/common/nm_bb_transc_fsm.c
@@ -59,6 +59,9 @@
static void st_op_disabled_notinstalled_on_enter(struct osmo_fsm_inst *fi, uint32_t prev_state)
{
struct gsm_bts_bb_trx *bb_transc = (struct gsm_bts_bb_trx *)fi->priv;
+ /* Reset state: */
+ TALLOC_FREE(bb_transc->mo.nm_attr);
+
bb_transc->mo.setattr_success = false;
bb_transc->mo.opstart_success = false;
oml_mo_state_chg(&bb_transc->mo, NM_OPSTATE_DISABLED, NM_AVSTATE_NOT_INSTALLED, NM_STATE_LOCKED);
diff --git a/src/common/nm_bts_fsm.c b/src/common/nm_bts_fsm.c
index c825ab5..c9dcd4c 100644
--- a/src/common/nm_bts_fsm.c
+++ b/src/common/nm_bts_fsm.c
@@ -59,6 +59,7 @@
struct gsm_bts *bts = (struct gsm_bts *)fi->priv;
/* Reset state: */
bts->si_valid = 0;
+ TALLOC_FREE(bts->mo.nm_attr);
bts->mo.setattr_success = false;
bts->mo.opstart_success = false;
diff --git a/src/common/nm_channel_fsm.c b/src/common/nm_channel_fsm.c
index 8ffddae..503ddfb 100644
--- a/src/common/nm_channel_fsm.c
+++ b/src/common/nm_channel_fsm.c
@@ -59,6 +59,7 @@
gsm_ts_release(ts);
if (ts->vamos.peer)
gsm_ts_release(ts->vamos.peer);
+ TALLOC_FREE(ts->mo.nm_attr);
ts->mo.setattr_success = false;
ts->mo.opstart_success = false;
diff --git a/src/common/nm_radio_carrier_fsm.c b/src/common/nm_radio_carrier_fsm.c
index be03d1d..88930dd 100644
--- a/src/common/nm_radio_carrier_fsm.c
+++ b/src/common/nm_radio_carrier_fsm.c
@@ -48,6 +48,9 @@
static void st_op_disabled_notinstalled_on_enter(struct osmo_fsm_inst *fi, uint32_t prev_state)
{
struct gsm_bts_trx *trx = (struct gsm_bts_trx *)fi->priv;
+ /* Reset state: */
+ TALLOC_FREE(trx->mo.nm_attr);
+
trx->mo.setattr_success = false;
trx->mo.opstart_success = false;
oml_mo_state_chg(&trx->mo, NM_OPSTATE_DISABLED, NM_AVSTATE_NOT_INSTALLED, NM_STATE_LOCKED);
--
To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/25730
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Change-Id: I45cc22dd68121a7930301581bfd0a8db37879c77
Gerrit-Change-Number: 25730
Gerrit-PatchSet: 2
Gerrit-Owner: pespin <pespin at sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy at sysmocom.de>
Gerrit-Reviewer: pespin <pespin at sysmocom.de>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20211008/0b3029d5/attachment.htm>