aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorPau Espin Pedrol <pespin@espeweb.net>2020-12-04 14:22:18 +0100
committerPau Espin Pedrol <pespin@espeweb.net>2020-12-04 15:54:34 +0100
commit44a0e0fc088eeb814e94957fa2525271a26e8cf0 (patch)
tree60c8adb567fdc1bbf8a212f04a1b1d9bfb568407 /include
parent396eb76fcd64b3e801005a1d8ec32ac53b725d7b (diff)
oml: Delay configuring NSVC until BTS features are negotiated
This is needed in order to to proper feature support verification for IPv6 when configuring the NSVC. Before this patch, there could be a race condition where NSVC FSM checked for BTS feature BTS_FEAT_IPV6_NSVC before it was negotiated through BTS Get Attributes (Ack). Fixes: OS#4870 Change-Id: I7c207eee0e331995ae04acec014fbd13d4d16280
Diffstat (limited to 'include')
-rw-r--r--include/osmocom/bsc/bts.h5
-rw-r--r--include/osmocom/bsc/nm_common_fsm.h1
2 files changed, 6 insertions, 0 deletions
diff --git a/include/osmocom/bsc/bts.h b/include/osmocom/bsc/bts.h
index fd968fa1c..2b05418fe 100644
--- a/include/osmocom/bsc/bts.h
+++ b/include/osmocom/bsc/bts.h
@@ -585,6 +585,11 @@ char *get_model_oml_status(const struct gsm_bts *bts);
/* reset the state of all MO in the BTS */
void gsm_bts_mo_reset(struct gsm_bts *bts);
+static inline bool gsm_bts_features_negotiated(struct gsm_bts *bts)
+{
+ return bts->mo.get_attr_rep_received || bts->mo.nm_state.operational == NM_OPSTATE_ENABLED;
+}
+
/* dependency handling */
void bts_depend_mark(struct gsm_bts *bts, int dep);
void bts_depend_clear(struct gsm_bts *bts, int dep);
diff --git a/include/osmocom/bsc/nm_common_fsm.h b/include/osmocom/bsc/nm_common_fsm.h
index bceefbe73..89ec863aa 100644
--- a/include/osmocom/bsc/nm_common_fsm.h
+++ b/include/osmocom/bsc/nm_common_fsm.h
@@ -36,6 +36,7 @@ enum nm_fsm_events {
NM_EV_OPSTART_NACK,
NM_EV_OML_DOWN,
NM_EV_FORCE_LOCK, /* Only supported by RadioCarrier so far */
+ NM_EV_FEATURE_NEGOTIATED, /* Sent by BTS to NSVC MO */
};
extern const struct value_string nm_fsm_event_names[];