diff options
author | Harald Welte <laforge@gnumonks.org> | 2017-12-17 20:50:34 +0100 |
---|---|---|
committer | Harald Welte <laforge@gnumonks.org> | 2017-12-17 20:51:48 +0100 |
commit | 62e40855c2b1b50627dba5b187be8869e2cb2054 (patch) | |
tree | 216d9a083fc3a91db44eab26c4c7080835e8b1b6 /src | |
parent | 84ea2e037490a9ad6c0a192cf237f88fd83cdd88 (diff) |
gsm0808_create_cipher_reject: Fix encoding of Cause IE
The Cause IE in the 08.08 CIPHER MODE REJECT is a normal TLV IE,
and not just a value. Let's make sure we encode the cause value
properly.
Change-Id: I4f5b231edf6dcb0a9c2bbafb2a59f301f3b2402b
Closes: OS#2766
Diffstat (limited to 'src')
-rw-r--r-- | src/gsm/gsm0808.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/gsm/gsm0808.c b/src/gsm/gsm0808.c index 2396a106..abf3d251 100644 --- a/src/gsm/gsm0808.c +++ b/src/gsm/gsm0808.c @@ -240,7 +240,8 @@ struct msgb *gsm0808_create_cipher_reject(uint8_t cause) if (!msg) return NULL; - msgb_tv_put(msg, BSS_MAP_MSG_CIPHER_MODE_REJECT, cause); + msgb_v_put(msg, BSS_MAP_MSG_CIPHER_MODE_REJECT); + msgb_tlv_put(msg, GSM0808_IE_CAUSE, 1, &cause); msg->l3h = msgb_tv_push(msg, BSSAP_MSG_BSS_MANAGEMENT, msgb_length(msg)); |