aboutsummaryrefslogtreecommitdiffstats
path: root/src/libmsc/ran_msg_a.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/libmsc/ran_msg_a.c')
-rw-r--r--src/libmsc/ran_msg_a.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/libmsc/ran_msg_a.c b/src/libmsc/ran_msg_a.c
index 106c2dff0..273f8dddd 100644
--- a/src/libmsc/ran_msg_a.c
+++ b/src/libmsc/ran_msg_a.c
@@ -483,6 +483,7 @@ static int ran_a_decode_handover_request(struct ran_dec *ran_dec, const struct m
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 @@ static int ran_a_decode_handover_request(struct ran_dec *ran_dec, const struct m
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 @@ struct msgb *ran_a_make_handover_request(struct osmo_fsm_inst *log_fi, const str
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)