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
diff --git a/src/libmsc/gsm_04_08.c b/src/libmsc/gsm_04_08.c
index 90669e1..ea40a96 100644
--- a/src/libmsc/gsm_04_08.c
+++ b/src/libmsc/gsm_04_08.c
@@ -693,6 +693,17 @@
 						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;