laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-bsc/+/32070 )
Change subject: abis_nm: Only osmo-bts re-purposes the MANUF_ID for BTS feature flags ......................................................................
abis_nm: Only osmo-bts re-purposes the MANUF_ID for BTS feature flags
The Manufacturer ID IE is normally used to indicate the [name of] the manufacturer. In case of ip.access nanoBTS it is, for example, "com.ipaccess".
Osmocom decided to re-pupose this IE to indicate bts-specific feature flags. Stop interpreting the string "com.ipaccess" as feature bitmap.
In fact, nanoBTS doesn't support runtime reporting of features (at least not in this way), so let's mark features_get_reported = false, resulting in the copy of bts_model->features to bts->features at the time a BTS is initialized.
Change-Id: I76cee190dc1f074464df570cdfc3d38559f04846 Closes: OS#5959 --- M src/osmo-bsc/abis_nm.c M src/osmo-bsc/bts_ipaccess_nanobts.c M src/osmo-bsc/bts_osmobts.c 3 files changed, 29 insertions(+), 18 deletions(-)
Approvals: laforge: Looks good to me, approved fixeria: Looks good to me, but someone else must approve pespin: Looks good to me, but someone else must approve osmith: Looks good to me, but someone else must approve Jenkins Builder: Verified
diff --git a/src/osmo-bsc/abis_nm.c b/src/osmo-bsc/abis_nm.c index 95cb858..5aaf069 100644 --- a/src/osmo-bsc/abis_nm.c +++ b/src/osmo-bsc/abis_nm.c @@ -573,7 +573,7 @@ struct abis_nm_sw_desc sw_descr[MAX_BTS_ATTR];
/* Parse Attribute Response Info content for 3GPP TS 52.021 §9.4.30 Manufacturer Id */ - if (TLVP_PRES_LEN(tp, NM_ATT_MANUF_ID, 2)) { + if (bts->type == GSM_BTS_TYPE_OSMOBTS && TLVP_PRES_LEN(tp, NM_ATT_MANUF_ID, 2)) { len = TLVP_LEN(tp, NM_ATT_MANUF_ID);
/* log potential BTS feature vector overflow */ @@ -606,19 +606,6 @@ " supported\n", osmo_bts_features_name(i)); }
- /* Add features from the BTS model: nanobts may support more - * features than it reports, since we extend the enum of - * features for osmo-bts. */ - if (bts->type == GSM_BTS_TYPE_NANOBTS) { - for (i = 0; i < _NUM_BTS_FEAT; i++) { - if (osmo_bts_has_feature(&bts->model->features, i) /* intentional check against bts model */ - && !osmo_bts_has_feature(&bts->features, i)) { - LOGPMO(&bts->mo, DNM, LOGL_NOTICE, "Get Attributes Response: feature '%s' is" - " assumed to be supported\n", osmo_bts_features_name(i)); - osmo_bts_set_feature(&bts->features, i); - } - } - } }
/* Parse Attribute Response Info content for 3GPP TS 52.021 §9.4.28 Manufacturer Dependent State */ diff --git a/src/osmo-bsc/bts_ipaccess_nanobts.c b/src/osmo-bsc/bts_ipaccess_nanobts.c index 83c8097..57a47b0 100644 --- a/src/osmo-bsc/bts_ipaccess_nanobts.c +++ b/src/osmo-bsc/bts_ipaccess_nanobts.c @@ -131,7 +131,7 @@ [NM_ATT_IPACC_REVOC_DATE] = { TLV_TYPE_TL16V }, }, }, - .features_get_reported = true, + .features_get_reported = false, };
@@ -638,9 +638,11 @@
bts->ip_access.flags = 0;
- /* Reset the feature vector */ - memset(bts->_features_data, 0, sizeof(bts->_features_data)); - bts->features_known = false; + if (bts->model->features_get_reported) { + /* Reset the feature vector */ + memset(bts->_features_data, 0, sizeof(bts->_features_data)); + bts->features_known = false; + }
/* * Go through the list and see if we are the depndency of a BTS diff --git a/src/osmo-bsc/bts_osmobts.c b/src/osmo-bsc/bts_osmobts.c index ea0405b..92c3340 100644 --- a/src/osmo-bsc/bts_osmobts.c +++ b/src/osmo-bsc/bts_osmobts.c @@ -188,6 +188,7 @@ model_osmobts = bts_model_nanobts; model_osmobts.name = "osmo-bts"; model_osmobts.type = GSM_BTS_TYPE_OSMOBTS; + model_osmobts.features_get_reported = true;
/* Unlike nanoBTS, osmo-bts does support SI2bis and SI2ter fine */ model_osmobts.force_combined_si = false;