aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVadim Yanitskiy <axilirator@gmail.com>2019-06-15 14:44:46 +0700
committerVadim Yanitskiy <axilirator@gmail.com>2019-06-15 15:38:03 +0700
commitefb1f60c76b1ee6c2986a3161f15037ff35b9d13 (patch)
treeb4f30f92927e00f320e3a77fdf0ea1d19f1ce851
parent04bbfb83d4247c351dc15aede49ac1f8c9d5dcb7 (diff)
libmsc/gsm_09_11.c: send GSUP PROS_SS ERROR message when needed
OsmoMSC should notify the remote SS/USSD entity if: - received GSUP message has unexpected session state; - received GSUP message has unknown session ID; - received GSUP message missing mandatory IE(s); - NCSS transaction establishment failed; - NCSS message delivery failed. Change-Id: Ief9f8a197b0860072b671edfc55180f619860d9d Related: (TTCN-3) Ie267ee174c5061cd3fc102a2824abe03d73f3aac Related: OS#2931
-rw-r--r--src/libmsc/gsm_09_11.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/libmsc/gsm_09_11.c b/src/libmsc/gsm_09_11.c
index 39b9711e4..4a7c34885 100644
--- a/src/libmsc/gsm_09_11.c
+++ b/src/libmsc/gsm_09_11.c
@@ -475,7 +475,7 @@ int gsm0911_gsup_rx(struct gsup_client_mux *gcm, void *data, const struct osmo_g
/* Attempt to establish a new transaction */
trans = establish_nc_ss_trans(net, vsub, gsup_msg);
if (!trans) {
- /* FIXME: send ERROR back to the HLR */
+ gsup_client_mux_tx_error_reply(gcm, gsup_msg, GMM_CAUSE_NET_FAIL);
return -EINVAL;
}
@@ -520,7 +520,7 @@ int gsm0911_gsup_rx(struct gsup_client_mux *gcm, void *data, const struct osmo_g
default:
LOG_TRANS(trans, LOGL_ERROR, "Unexpected session state %d\n",
gsup_msg->session_state);
- /* FIXME: send ERROR back to the HLR */
+ gsup_client_mux_tx_error_reply(gcm, gsup_msg, GMM_CAUSE_MSGT_INCOMP_P_STATE);
msgb_free(ss_msg);
return -EINVAL;
}
@@ -530,7 +530,7 @@ int gsm0911_gsup_rx(struct gsup_client_mux *gcm, void *data, const struct osmo_g
if (!gsup_msg->ss_info || gsup_msg->ss_info_len < 2) {
LOG_TRANS(trans, LOGL_ERROR, "Missing mandatory Facility IE "
"for mapped 0x%02x message\n", gh->msg_type);
- /* FIXME: send ERROR back to the HLR */
+ gsup_client_mux_tx_error_reply(gcm, gsup_msg, GMM_CAUSE_INV_MAND_INFO);
msgb_free(ss_msg);
return -EINVAL;
}
@@ -553,6 +553,7 @@ int gsm0911_gsup_rx(struct gsup_client_mux *gcm, void *data, const struct osmo_g
msc_a = trans->msc_a;
if (!msc_a) {
LOG_TRANS(trans, LOGL_ERROR, "Cannot send SS message, no local MSC-A role defined for subscriber\n");
+ gsup_client_mux_tx_error_reply(gcm, gsup_msg, GMM_CAUSE_NET_FAIL);
msgb_free(ss_msg);
return -EINVAL;
}