aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVadim Yanitskiy <vyanitskiy@sysmocom.de>2023-03-10 05:15:22 +0700
committerfixeria <vyanitskiy@sysmocom.de>2023-03-10 13:43:43 +0000
commit30ecd0a767dda4b3113a16087a363a5b3cda6902 (patch)
tree938a120c99b00848864d9c3e753be35b5a1e65a9
parent39d214fab57dc608f19dafff4e62d0e728341bf8 (diff)
ipaccess_drop_oml(): invalidate the feature vector
It's possible that a BTS gets disconnected, updated to a more recent version or downgraded to an older version, and then connects to the BSC again. That more recent or older BTS version may have a different set of supported features, so osmo-bsc must not trust the previously reported feature vector. Change-Id: Ie93af849d7771b4fff3cdf647c82510cd8543975
-rw-r--r--src/osmo-bsc/bts_ipaccess_nanobts.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/osmo-bsc/bts_ipaccess_nanobts.c b/src/osmo-bsc/bts_ipaccess_nanobts.c
index 9f17359d7..1a57deb42 100644
--- a/src/osmo-bsc/bts_ipaccess_nanobts.c
+++ b/src/osmo-bsc/bts_ipaccess_nanobts.c
@@ -641,6 +641,10 @@ void ipaccess_drop_oml(struct gsm_bts *bts, const char *reason)
bts->ip_access.flags = 0;
+ /* 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
* and then drop the BTS. This can lead to some recursion but it