summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/gsm/gsm0808.c3
-rw-r--r--tests/gsm0808/gsm0808_test.c2
2 files changed, 3 insertions, 2 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));
diff --git a/tests/gsm0808/gsm0808_test.c b/tests/gsm0808/gsm0808_test.c
index 28bd7f72..189d5483 100644
--- a/tests/gsm0808/gsm0808_test.c
+++ b/tests/gsm0808/gsm0808_test.c
@@ -233,7 +233,7 @@ static void test_create_cipher_complete()
static void test_create_cipher_reject()
{
- static const uint8_t res[] = { 0x00, 0x02, 0x59, 0x23 };
+ static const uint8_t res[] = { 0x00, 0x04, 0x59, 0x04, 0x01, 0x23 };
struct msgb *msg;
printf("Testing creating Cipher Reject\n");