aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVadim Yanitskiy <vyanitskiy@sysmocom.de>2022-03-22 18:46:20 +0300
committerVadim Yanitskiy <vyanitskiy@sysmocom.de>2022-03-22 19:16:07 +0300
commitb7f6623f6061fad38fd89a405d0e7eabd7f71ffb (patch)
treeab42f1542cfbd5ec06f65b2ef9d181eb57b1e555
parentbd4a7dafd5e9ac6eb1b1e3f9fadcf76eb57aed4c (diff)
BSSMAP LE: fix handling of LCS Client Type IE
On receipt of the Perform Location Request message, the BSC needs to forward it to the SMLC. If the LCS Client Type IE is present in the original message, it must be delivered to the SMLC too. Change-Id: Id3262e67c3dc25cb93fbd52a40689c5529ca2d41 Related: SYS#5891
-rw-r--r--include/osmocom/bsc/lcs_loc_req.h3
-rw-r--r--src/osmo-bsc/lcs_loc_req.c10
2 files changed, 13 insertions, 0 deletions
diff --git a/include/osmocom/bsc/lcs_loc_req.h b/include/osmocom/bsc/lcs_loc_req.h
index 86540f278..7b10b7e2d 100644
--- a/include/osmocom/bsc/lcs_loc_req.h
+++ b/include/osmocom/bsc/lcs_loc_req.h
@@ -31,6 +31,9 @@ struct lcs_loc_req {
bool cell_id_present;
struct gsm0808_cell_id cell_id;
+ bool client_type_present;
+ enum bssmap_le_lcs_client_type client_type;
+
struct osmo_mobile_identity imsi;
struct osmo_mobile_identity imei;
} req;
diff --git a/src/osmo-bsc/lcs_loc_req.c b/src/osmo-bsc/lcs_loc_req.c
index cb55f5ff8..69780495a 100644
--- a/src/osmo-bsc/lcs_loc_req.c
+++ b/src/osmo-bsc/lcs_loc_req.c
@@ -127,6 +127,13 @@ static bool parse_bssmap_perf_loc_req(struct lcs_loc_req *lcs_loc_req, struct ms
lcs_loc_req->req.cell_id_present = true;
}
+ /* 3GPP TS 49.031, section 10.14 (C) "LCS Client Type" */
+ if (TLVP_PRES_LEN(tp, GSM0808_IE_LCS_CLIENT_TYPE, 1)) {
+ lcs_loc_req->req.client_type = *TLVP_VAL(tp, GSM0808_IE_LCS_CLIENT_TYPE);
+ lcs_loc_req->req.client_type_present = true;
+ } else if (lcs_loc_req->req.location_type.location_information == BSSMAP_LE_LOC_INFO_CURRENT_GEOGRAPHIC)
+ PARSE_ERR("Missing LCS Client Type IE");
+
if ((e = TLVP_GET(tp, GSM0808_IE_IMSI))) {
if (osmo_mobile_identity_decode(&lcs_loc_req->req.imsi, e->val, e->len, false)
|| lcs_loc_req->req.imsi.type != GSM_MI_TYPE_IMSI)
@@ -300,6 +307,9 @@ static void lcs_loc_req_wait_loc_resp_onenter(struct osmo_fsm_inst *fi, uint32_t
.cell_id = lcs_loc_req->req.cell_id,
.imsi = lcs_loc_req->req.imsi,
.imei = lcs_loc_req->req.imei,
+
+ .lcs_client_type_present = lcs_loc_req->req.client_type_present,
+ .lcs_client_type = lcs_loc_req->req.client_type,
},
},
};