aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorNeels Hofmeyr <neels@hofmeyr.de>2017-12-14 03:57:31 +0100
committerNeels Hofmeyr <neels@hofmeyr.de>2017-12-18 03:48:24 +0100
commitcf30913c8e2a43606edff751268dacc4886d7e4c (patch)
tree452645e3f8f39af3fc0f46ee1289b4fe3c211d96 /src
parent4cf4fddf287edb171939c5585db576be9addd474 (diff)
fix BSSMAP Cipher Mode Cmd: properly set permitted algorithms
The bit shifting is performed in gsm0808_enc_encrypt_info(), and must not be done when populating the gsm0808_encrypt_info struct. Provide vlr_ciph_to_gsm0808_alg_id() to translate the enum vlr_ciph to the GSM0808_* constants we need to put in the gsm0808_encrypt_info struct instead. Related: OS#2745 Change-Id: If75f95e8a5cc8b9979610ce6d746c1f0073ee39a
Diffstat (limited to 'src')
-rw-r--r--src/libmsc/a_iface.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libmsc/a_iface.c b/src/libmsc/a_iface.c
index f863517c4..69b4c0991 100644
--- a/src/libmsc/a_iface.c
+++ b/src/libmsc/a_iface.c
@@ -198,7 +198,7 @@ int a_iface_tx_cipher_mode(const struct gsm_subscriber_connection *conn,
if (include_imeisv)
crm_ptr = &crm;
- ei.perm_algo[0] = (uint8_t) (1 << cipher);
+ ei.perm_algo[0] = vlr_ciph_to_gsm0808_alg_id(cipher);
ei.perm_algo_len = 1;
msg_resp = gsm0808_create_cipher(&ei, crm_ptr);