aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/src/libmsc/osmo_msc.c
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2012-01-23 16:40:24 +0100
committerHarald Welte <laforge@gnumonks.org>2012-01-23 16:40:24 +0100
commitcf149eebb69ac015dc0f4a3eed57821c862300de (patch)
treeb917593640e00d1a23fbb7285a6e3980240d3a91 /openbsc/src/libmsc/osmo_msc.c
parent95e862cab42e41568ba11599aa3e78d92f54bdf8 (diff)
Move the bulk of RR processing from MSC into BSC
RR Messages like STATUS, GPRS SUSPEND, HANDOVER COMPLETE/FAIL, ... should be processed on the BSC side of things, not on the MSC side. This is among other things required in preparation of intra-BSC hand-over support in osmo-bsc.
Diffstat (limited to 'openbsc/src/libmsc/osmo_msc.c')
-rw-r--r--openbsc/src/libmsc/osmo_msc.c29
1 files changed, 29 insertions, 0 deletions
diff --git a/openbsc/src/libmsc/osmo_msc.c b/openbsc/src/libmsc/osmo_msc.c
index 121de679c..4c0862aae 100644
--- a/openbsc/src/libmsc/osmo_msc.c
+++ b/openbsc/src/libmsc/osmo_msc.c
@@ -101,6 +101,34 @@ static void msc_classmark_chg(struct gsm_subscriber_connection *conn,
}
}
+static void msc_ciph_m_compl(struct gsm_subscriber_connection *conn,
+ struct msgb *msg, uint8_t alg_id)
+{
+ gsm_cbfn *cb;
+
+ DEBUGP(DRR, "CIPHERING MODE COMPLETE\n");
+
+ /* Safety check */
+ if (!conn->sec_operation) {
+ DEBUGP(DRR, "No authentication/cipher operation in progress !!!\n");
+ return;
+ }
+
+ /* FIXME: check for MI (if any) */
+
+ /* Call back whatever was in progress (if anything) ... */
+ cb = conn->sec_operation->cb;
+ if (cb) {
+ int rc;
+ rc = cb(GSM_HOOK_RR_SECURITY, GSM_SECURITY_SUCCEEDED,
+ NULL, conn, conn->sec_operation->cb_data);
+
+ }
+
+ /* Complete the operation */
+ release_security_operation(conn);
+}
+
static struct bsc_api msc_handler = {
@@ -111,6 +139,7 @@ static struct bsc_api msc_handler = {
.assign_compl = msc_assign_compl,
.assign_fail = msc_assign_fail,
.classmark_chg = msc_classmark_chg,
+ .cipher_mode_compl = msc_ciph_m_compl,
};
struct bsc_api *msc_bsc_api() {