From 37382ec2cf26ebcd70918457cb4d2b7285c52e0d Mon Sep 17 00:00:00 2001 From: Harald Welte Date: Wed, 24 Jan 2018 12:49:34 +0100 Subject: [PATCH] Reject any CM SERVICE we don't support When we receive a CM Service Request, OsmoMSC should eventually verify what kind of service it is the phone requests, and whether we support that service. Change-Id: I499730d760dc9ac7f599e09959c6eac4452f2eab Closes: OS#2668 --- src/libmsc/gsm_04_08.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/libmsc/gsm_04_08.c b/src/libmsc/gsm_04_08.c index 90669e13c..ea40a9608 100644 --- a/src/libmsc/gsm_04_08.c +++ b/src/libmsc/gsm_04_08.c @@ -693,6 +693,17 @@ int gsm48_rx_mm_serv_req(struct gsm_subscriber_connection *conn, struct msgb *ms GSM48_REJECT_INCORRECT_MESSAGE); } + switch (req->cm_service_type) { + case GSM48_CMSERV_MO_CALL_PACKET: + case GSM48_CMSERV_EMERGENCY: + case GSM48_CMSERV_SMS: + case GSM48_CMSERV_SUP_SERV: + /* continue below */ + break; + default: + return msc_gsm48_tx_mm_serv_rej(conn, GSM48_REJECT_SRV_OPT_NOT_SUPPORTED); + } + osmo_signal_dispatch(SS_SUBSCR, S_SUBSCR_IDENTITY, (classmark2 + classmark2_len)); memcpy(conn->classmark.classmark2, classmark2, classmark2_len); conn->classmark.classmark2_len = classmark2_len;