Change in osmo-msc[master]: support A5/4 in inter-BSC handover

neels gerrit-no-reply at lists.osmocom.org
Wed Jun 23 22:11:28 UTC 2021


neels has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-msc/+/24765 )


Change subject: support A5/4 in inter-BSC handover
......................................................................

support A5/4 in inter-BSC handover

Forward the Kc128 key to the new BSS in BSSMAP Handover Request.

Change-Id: Id5ce995a741c8e469a50a0c46e53c06a2378bb7e
---
M src/libmsc/ran_msg_a.c
1 file changed, 12 insertions(+), 0 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/65/24765/1

diff --git a/src/libmsc/ran_msg_a.c b/src/libmsc/ran_msg_a.c
index 106c2df..273f8dd 100644
--- a/src/libmsc/ran_msg_a.c
+++ b/src/libmsc/ran_msg_a.c
@@ -483,6 +483,7 @@
 	const struct tlv_p_entry *ie_aoip_transp_addr = TLVP_GET(tp, GSM0808_IE_AOIP_TRASP_ADDR);
 	const struct tlv_p_entry *ie_codec_list_msc_preferred = TLVP_GET(tp, GSM0808_IE_SPEECH_CODEC_LIST);
 	const struct tlv_p_entry *ie_call_id = TLVP_GET(tp, GSM0808_IE_CALL_ID);
+	const struct tlv_p_entry *ie_kc128 = TLVP_GET(tp, GSM0808_IE_KC_128);
 	const struct tlv_p_entry *ie_global_call_ref = TLVP_GET(tp, GSM0808_IE_GLOBAL_CALL_REF);
 
 	struct gsm0808_channel_type channel_type;
@@ -525,6 +526,11 @@
 			geran_encr.key_len = encr_info.key_len;
 		}
 
+		if (ie_kc128) {
+			memcpy(geran_encr.kc128, ie_kc128->val, 16);
+			geran_encr.kc128_present = true;
+		}
+
 		r->geran.chosen_encryption = &geran_encr;
 	}
 
@@ -1166,6 +1172,12 @@
 		       n->geran.chosen_encryption->key, n->geran.chosen_encryption->key_len);
 		r.encryption_information.key_len = n->geran.chosen_encryption->key_len;
 		r.chosen_encryption_algorithm_serving = n->geran.chosen_encryption->alg_id;
+
+		if (n->geran.chosen_encryption->kc128_present) {
+			r.more_items = true;
+			memcpy(r.kc128, n->geran.chosen_encryption->kc128, sizeof(r.kc128));
+			r.kc128_present = true;
+		}
 	}
 
 	if (n->classmark)

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

Gerrit-Project: osmo-msc
Gerrit-Branch: master
Gerrit-Change-Id: Id5ce995a741c8e469a50a0c46e53c06a2378bb7e
Gerrit-Change-Number: 24765
Gerrit-PatchSet: 1
Gerrit-Owner: neels <nhofmeyr at sysmocom.de>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20210623/82a979a6/attachment.htm>


More information about the gerrit-log mailing list