Bug #6172
closedoml: proper handling of Get Attributes for all MOs
100%
Description
Current osmo-bts can handle Get Attributes
only for NM_OC_BTS
and NM_OC_BASEB_TRANSC
. For any other Object Class MOs it would respond with NACK, causing osmo-bsc to drop the OML connection. This behavior is not conforming to 3GPP TS 52.021, which defines all settable/gettable attributes for all MOs in Table 2. This problem also affects the ip.access specific MOs (NM_OC_GPRS_NSE
, NM_OC_GPRS_CELL
, NM_OC_GPRS_NSVC
).
Updated by fixeria 5 months ago
fixeria wrote:
For any other Object Class MOs it would respond with NACK, causing osmo-bsc to drop the OML connection.
Corrections/clarifications:
- osmo-bsc does not actually drop the OML connection, it just prints an error. Here is the related code:
958f259f95 src/osmo-bsc/osmo_bsc_main.c (Neels Hofmeyr 2018-05-27 01:26:31 +0200 215) static int oml_msg_nack(struct nm_nack_signal_data *nack)
958f259f95 src/osmo-bsc/osmo_bsc_main.c (Neels Hofmeyr 2018-05-27 01:26:31 +0200 216) {
958f259f95 src/osmo-bsc/osmo_bsc_main.c (Neels Hofmeyr 2018-05-27 01:26:31 +0200 217) if (nack->mt == NM_MT_GET_ATTR_NACK) {
958f259f95 src/osmo-bsc/osmo_bsc_main.c (Neels Hofmeyr 2018-05-27 01:26:31 +0200 218) LOGP(DNM, LOGL_ERROR, "BTS%u does not support Get Attributes "
958f259f95 src/osmo-bsc/osmo_bsc_main.c (Neels Hofmeyr 2018-05-27 01:26:31 +0200 219) "OML message.\n", nack->bts->nr);
958f259f95 src/osmo-bsc/osmo_bsc_main.c (Neels Hofmeyr 2018-05-27 01:26:31 +0200 220) return 0;
958f259f95 src/osmo-bsc/osmo_bsc_main.c (Neels Hofmeyr 2018-05-27 01:26:31 +0200 221) }
- osmo-bts 1.7.1 (latest stable release) does send Get Attributes NACK:
DOML ERROR oml.c:259 O&M Get Attributes [2], unknown 0xa7 is unsupported by BTS. DOML ERROR oml.c:294 OC=GPRS-CELL INST=(00,ff,ff): Unsupported MO class in Get Attribute Response DOML ERROR oml.c:300 OC=GPRS-CELL INST=(00,ff,ff): Tx Get Attribute Response FAILED with rc=-6 DOML ERROR oml.c:538 OC=GPRS-CELL(f1) INST=(00,00,ff): Responding to O&M Get Attributes message with NACK 06 DOML NOTICE oml.c:1071 OC=GPRS-CELL(f1) INST=(00,00,ff): ADM STATE Locked -> Unlocked DOML ERROR oml.c:294 OC=RADIO-CARRIER INST=(00,00,ff): Unsupported MO class in Get Attribute Response DOML ERROR oml.c:300 OC=RADIO-CARRIER INST=(00,00,ff): Tx Get Attribute Response FAILED with rc=-6 DOML ERROR oml.c:538 OC=RADIO-CARRIER(02) INST=(00,00,ff): Responding to O&M Get Attributes message with NACK 06 DOML NOTICE oml.c:1071 OC=RADIO-CARRIER(02) INST=(00,00,ff): ADM STATE Locked -> Unlocked DOML ERROR oml.c:220 (bts=0,trx=0): O&M Get Attributes [0], Manufacturer Dependent State is unsupported by TRX. DOML ERROR oml.c:220 (bts=0,trx=0): O&M Get Attributes [2], unknown 0xa7 is unsupported by TRX.
- osmo-bts 1013ca3b (current master) does not send Get Attributes NACK, instead it sends Get Attributes Response with a list unsupported attributes. Here is the related code:
fbd8aa8a7 (Vadim Yanitskiy 2023-09-15 04:05:13 +0700 282) /* send 3GPP TS 52.021 ยง8.11.2 Get Attribute Response */
fbd8aa8a7 (Vadim Yanitskiy 2023-09-15 04:05:13 +0700 283) static int oml_tx_attr_resp(const struct gsm_abis_mo *mo,
fbd8aa8a7 (Vadim Yanitskiy 2023-09-15 04:05:13 +0700 284) const uint8_t *attr, uint16_t attr_len)
b7793ed8f (Max Suraev 2017-06-09 16:46:50 +0200 285) {
fbd8aa8a7 (Vadim Yanitskiy 2023-09-15 04:05:13 +0700 286) struct msgb *nmsg = oml_msgb_alloc();
fbd8aa8a7 (Vadim Yanitskiy 2023-09-15 04:05:13 +0700 287) unsigned int num_unsupported = 0;
fbd8aa8a7 (Vadim Yanitskiy 2023-09-15 04:05:13 +0700 288) int rc;
72993079e (Max Suraev 2017-05-10 16:01:56 +0200 289)
fbd8aa8a7 (Vadim Yanitskiy 2023-09-15 04:05:13 +0700 290) if (!nmsg)
fbd8aa8a7 (Vadim Yanitskiy 2023-09-15 04:05:13 +0700 291) return -NM_NACK_CANT_PERFORM;
b7793ed8f (Max Suraev 2017-06-09 16:46:50 +0200 292)
fbd8aa8a7 (Vadim Yanitskiy 2023-09-15 04:05:13 +0700 293) for (unsigned int i = 0; i < attr_len; i++) {
b7793ed8f (Max Suraev 2017-06-09 16:46:50 +0200 294) switch (attr[i]) {
...........
fbd8aa8a7 (Vadim Yanitskiy 2023-09-15 04:05:13 +0700 322) unsupported:
fbd8aa8a7 (Vadim Yanitskiy 2023-09-15 04:05:13 +0700 323) LOGP(DOML, LOGL_ERROR, "%s: O&M Get Attributes [%u], %s is unsupported\n",
fbd8aa8a7 (Vadim Yanitskiy 2023-09-15 04:05:13 +0700 324) gsm_abis_mo_name(mo), i, get_value_string(abis_nm_att_names, attr[i]));
038a1fa04 (Vadim Yanitskiy 2019-04-19 20:19:58 +0700 325) /* Push this tag to the list of unsupported attributes */
fbd8aa8a7 (Vadim Yanitskiy 2023-09-15 04:05:13 +0700 326) msgb_push_u8(nmsg, attr[i]);
038a1fa04 (Vadim Yanitskiy 2019-04-19 20:19:58 +0700 327) num_unsupported++;
b7793ed8f (Max Suraev 2017-06-09 16:46:50 +0200 328) }
72993079e (Max Suraev 2017-05-10 16:01:56 +0200 329) }
72993079e (Max Suraev 2017-05-10 16:01:56 +0200 330)
038a1fa04 (Vadim Yanitskiy 2019-04-19 20:19:58 +0700 331) /* Push the amount of unsupported attributes */
fbd8aa8a7 (Vadim Yanitskiy 2023-09-15 04:05:13 +0700 332) msgb_push_u8(nmsg, num_unsupported);
72993079e (Max Suraev 2017-05-10 16:01:56 +0200 333)
038a1fa04 (Vadim Yanitskiy 2019-04-19 20:19:58 +0700 334) /* Push Get Attribute Response Info TL (actually TV where V is L) */
038a1fa04 (Vadim Yanitskiy 2019-04-19 20:19:58 +0700 335) msgb_tv16_push(nmsg, NM_ATT_GET_ARI, msgb_length(nmsg));
72993079e (Max Suraev 2017-05-10 16:01:56 +0200 336)
038a1fa04 (Vadim Yanitskiy 2019-04-19 20:19:58 +0700 337) rc = oml_mo_send_msg(mo, nmsg, NM_MT_GET_ATTR_RESP);
038a1fa04 (Vadim Yanitskiy 2019-04-19 20:19:58 +0700 338) return (rc < 0) ? -NM_NACK_CANT_PERFORM : rc;
72993079e (Max Suraev 2017-05-10 16:01:56 +0200 339) }
Updated by fixeria 5 months ago
Also, handling of these three attributes:
- NM_ATT_OPER_STATE,
- NM_ATT_ADM_STATE,
- NM_ATT_AVAIL_STATUS,
has already been implemented for all MOs, see:
https://cgit.osmocom.org/osmo-bts/commit/?id=e8518ae375049ad887fbf26e7c1852830e579e46
https://cgit.osmocom.org/osmo-bts/commit/?id=fbd8aa8a77f851aba8f1b66114b4c79d246d0d67
https://cgit.osmocom.org/osmo-bts/commit/?id=9d9d9e2f27ebe0b4132f125dbc81197f77d752ea