Change in osmo-bsc[master]: SRVCC: Parse Last Used E-UTRAN PLMN Id in Handover Request

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/.

laforge gerrit-no-reply at lists.osmocom.org
Sat Apr 24 08:49:08 UTC 2021


laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-bsc/+/23753 )

Change subject: SRVCC: Parse Last Used E-UTRAN PLMN Id in Handover Request
......................................................................

SRVCC: Parse Last Used E-UTRAN PLMN Id in Handover Request

Whenever SRVCC EUTRAN->GERAN is performed by the CN, it will set the
Last Used E-UTRAN PLMN Id in order for the BSS to inform the MS
about EUTRAN neighbors once the call is over.
The last part (sending EUTRAN neighs) is already implemented, since same
thing is done as per CSFB. However, we lacked the first part, where the
EUTRAN PLMN Id is recorded for later use.

Actually, in both cases, we end up building the list of neighbors
without taking into accound the PLMN value (hence no filtering of
configured neighs), but it only sends such a list if any PLMN was stored
there, which means this patch is still necessary for a quick fallback to
4G after the call is over.

Related: SYS#5337
Depends: libosmocore.git Change-Id I0e55e947b6fef6dad0cf1a6c16b781bef4cc76c5
Change-Id: Ia5008f11a4c36ef8085a2037d4abddd131086e6e
---
M TODO-RELEASE
M include/osmocom/bsc/gsm_data.h
M src/osmo-bsc/handover_fsm.c
3 files changed, 39 insertions(+), 0 deletions(-)

Approvals:
  laforge: Looks good to me, approved
  fixeria: Looks good to me, but someone else must approve
  Jenkins Builder: Verified



diff --git a/TODO-RELEASE b/TODO-RELEASE
index 1a72401..de9e62c 100644
--- a/TODO-RELEASE
+++ b/TODO-RELEASE
@@ -8,3 +8,4 @@
 # If any interfaces have been removed or changed since the last public release: c:r:0.
 #library	what		description / commit summary line
 libosmocore	>1.5.1		needs osmo_bts_features_name(), osmo_bts_features_desc()
+libosmogsm    >1.5.1            enum entry GSM0808_FE_IE_LAST_USED_EUTRAN_PLMN_ID
diff --git a/include/osmocom/bsc/gsm_data.h b/include/osmocom/bsc/gsm_data.h
index 448098b..0bc881b 100644
--- a/include/osmocom/bsc/gsm_data.h
+++ b/include/osmocom/bsc/gsm_data.h
@@ -202,6 +202,8 @@
 	uint16_t msc_assigned_cic;
 	char msc_assigned_rtp_addr[INET6_ADDRSTRLEN];
 	uint16_t msc_assigned_rtp_port;
+	bool last_eutran_plmn_valid;
+	struct osmo_plmn_id last_eutran_plmn;
 };
 
 struct handover {
diff --git a/src/osmo-bsc/handover_fsm.c b/src/osmo-bsc/handover_fsm.c
index f6dad9d..53cafed 100644
--- a/src/osmo-bsc/handover_fsm.c
+++ b/src/osmo-bsc/handover_fsm.c
@@ -417,6 +417,32 @@
 	lchan_activate(ho->new_lchan, &info);
 }
 
+/* 3GPP TS 48.008 § 3.2.2.58  Old BSS to New BSS Information */
+static void parse_old2new_bss_info(struct gsm_subscriber_connection *conn,
+				   const uint8_t* data, uint16_t len,
+				   struct handover_in_req *req)
+{
+	/* § 3.2.2.58: Information contained here shall take precedence over
+	   duplicate information from Information Elements in the HANDOVER
+	   REQUEST  as long as the coding is understood by the new BSS */
+	/* § 3.2.2.58: <<Reception of an erroneous "Old BSS to New BSS
+	   information" shall not cause a rejection of the HANDOVER REQUEST
+	   message; the "Old BSS to New BSS information" information element
+	   shall be discarded and the handover resource allocation procedure
+	   shall continue>>. See also 3.1.19.7. */
+	struct tlv_parsed tp;
+	if (tlv_parse(&tp, &gsm0808_old_bss_to_new_bss_info_att_tlvdef, data, len, 0, 0) <= 0) {
+		LOG_HO(conn, LOGL_NOTICE, "Failed to parse IE \"Old BSS to New BSS information\"\n");
+		return;
+	}
+
+	if (TLVP_VAL(&tp, GSM0808_FE_IE_LAST_USED_EUTRAN_PLMN_ID)) {
+		req->last_eutran_plmn_valid = true;
+		osmo_plmn_from_bcd(TLVP_VAL(&tp, GSM0808_FE_IE_LAST_USED_EUTRAN_PLMN_ID),
+				   &req->last_eutran_plmn);
+	}
+}
+
 /* 3GPP TS 48.008 § 3.2.1.8 Handover Request */
 static bool parse_ho_request(struct gsm_subscriber_connection *conn, const struct msgb *msg,
 			     struct handover_in_req *req)
@@ -557,6 +583,10 @@
 		return false;
 	}
 
+	if ((e = TLVP_GET(tp, GSM0808_IE_OLD_BSS_TO_NEW_BSS_INFORMATION))) {
+		parse_old2new_bss_info(conn, e->val, e->len, req);
+	}
+
 	/* A lot of IEs remain ignored... */
 
 	return true;
@@ -691,6 +721,12 @@
 		info.encr.key_len = req->ei.key_len;
 	}
 
+	if (req->last_eutran_plmn_valid) {
+		conn->last_eutran_plmn_valid = true;
+		memcpy(&conn->last_eutran_plmn, &req->last_eutran_plmn,
+		       sizeof(conn->last_eutran_plmn));
+	}
+
 	lchan_activate(ho->new_lchan, &info);
 }
 

-- 
To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/23753
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: Ia5008f11a4c36ef8085a2037d4abddd131086e6e
Gerrit-Change-Number: 23753
Gerrit-PatchSet: 8
Gerrit-Owner: pespin <pespin at sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: dexter <pmaier at sysmocom.de>
Gerrit-Reviewer: fixeria <vyanitskiy at sysmocom.de>
Gerrit-Reviewer: laforge <laforge at osmocom.org>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20210424/f786b065/attachment.htm>


More information about the gerrit-log mailing list