Fix BTS attribute requests

* fix BTS numbers: use 0 to indicate given BTS and 0xFF to indicate all
  BTS' as it's explained in 3GPP TS 52.021 ยง9.3.
* only request attributes from supported (OsmoBTS) types

Change-Id: I8f43055c38000248033a8ff9ddaf0910d68d794b
Related: OS#2317
diff --git a/src/libbsc/abis_nm.c b/src/libbsc/abis_nm.c
index 019d039..cf20d7c 100644
--- a/src/libbsc/abis_nm.c
+++ b/src/libbsc/abis_nm.c
@@ -1590,10 +1590,17 @@
 		     const uint8_t *attr, uint8_t attr_len)
 {
 	struct abis_om_hdr *oh;
-	struct msgb *msg = nm_msgb_alloc();
+	struct msgb *msg;
+
+	if (bts->type != GSM_BTS_TYPE_OSMOBTS) {
+		LOGPC(DNM, LOGL_NOTICE, "Getting attributes from BTS%d type %s is not supported.\n",
+		      bts->nr, btstype2str(bts->type));
+		return -EINVAL;
+	}
 
 	DEBUGP(DNM, "Get Attr (bts=%d)\n", bts->nr);
 
+	msg = nm_msgb_alloc();
 	oh = (struct abis_om_hdr *) msgb_put(msg, ABIS_OM_FOM_HDR_SIZE);
 	fill_om_fom_hdr(oh, attr_len, NM_MT_GET_ATTR, obj_class,
 			bts_nr, trx_nr, ts_nr);