diff --git a/openbsc/src/bsc/osmo_bsc_api.c b/openbsc/src/bsc/osmo_bsc_api.c index 82074e7e1..1e66a0ddd 100644 --- a/openbsc/src/bsc/osmo_bsc_api.c +++ b/openbsc/src/bsc/osmo_bsc_api.c @@ -21,6 +21,8 @@ #include #include +#include + #define return_when_not_connected(conn) \ if (!conn->sccp_con) {\ LOGP(DMSC, LOGL_ERROR, "MSC Connection not present.\n"); \ @@ -41,7 +43,17 @@ static void bsc_sapi_n_reject(struct gsm_subscriber_connection *conn, int dlci) static void bsc_cipher_mode_compl(struct gsm_subscriber_connection *conn, struct msgb *msg, uint8_t chosen_encr) { + struct msgb *resp; return_when_not_connected(conn); + + LOGP(DMSC, LOGL_DEBUG, "CIPHER MODE COMPLETE from MS, forwarding to MSC\n"); + resp = gsm0808_create_cipher_complete(msg, chosen_encr); + if (!resp) { + LOGP(DMSC, LOGL_ERROR, "Creating the response failed.\n"); + return; + } + + bsc_queue_for_msc(conn, resp); } static int bsc_compl_l3(struct gsm_subscriber_connection *conn, struct msgb *msg,