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/.
fixeria gerrit-no-reply at lists.osmocom.orgfixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-bsc/+/18598 )
Change subject: abis_nm: fix: properly warn about unknown BTS features
......................................................................
abis_nm: fix: properly warn about unknown BTS features
Change-Id: I40925ecc02ff94e510c04b048fe1bbc2066a7776
---
M src/osmo-bsc/abis_nm.c
1 file changed, 11 insertions(+), 8 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/98/18598/1
diff --git a/src/osmo-bsc/abis_nm.c b/src/osmo-bsc/abis_nm.c
index db2879f..4e01b47 100644
--- a/src/osmo-bsc/abis_nm.c
+++ b/src/osmo-bsc/abis_nm.c
@@ -567,6 +567,7 @@
/* 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)) {
+ data = TLVP_VAL(tp, NM_ATT_MANUF_ID);
len = TLVP_LEN(tp, NM_ATT_MANUF_ID);
/* log potential BTS feature vector overflow */
@@ -576,15 +577,17 @@
len = sizeof(bts->_features_data);
}
- /* check that max. expected BTS attribute is above given feature vector length */
- if (len > OSMO_BYTES_FOR_BITS(_NUM_BTS_FEAT)) {
- LOGP(DNM, LOGL_NOTICE, "BTS%u Get Attributes Response: reported unexpectedly long (%u bytes) "
- "feature vector - most likely it was compiled against newer BSC headers. "
- "Consider upgrading your BSC to later version.\n",
- bts->nr, len);
- }
+ memcpy(bts->_features_data, data, len);
- memcpy(bts->_features_data, TLVP_VAL(tp, NM_ATT_MANUF_ID), len);
+ /* Warn about new features that we're now aware of */
+ for (i = _NUM_BTS_FEAT; i < len * 8; i++) {
+ rc = bitvec_get_bit_pos(&bts->features, i);
+ if (!rc)
+ continue;
+
+ LOGP(DNM, LOGL_NOTICE, "BTS%u Get Attributes Response: unknown feature #%d. "
+ "Consider upgrading your BSC/BTS to later version.\n", bts->nr, i);
+ }
for (i = 0; i < _NUM_BTS_FEAT; i++) {
if (osmo_bts_has_feature(&bts->features, i) != osmo_bts_has_feature(&bts->model->features, i)) {
--
To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/18598
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: I40925ecc02ff94e510c04b048fe1bbc2066a7776
Gerrit-Change-Number: 18598
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria <axilirator at gmail.com>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20200529/b7ac2d84/attachment.htm>