aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Couzens <lynxis@fe80.eu>2019-08-19 15:41:33 +0200
committerlaforge <laforge@osmocom.org>2019-10-17 08:02:07 +0000
commita09f4987c1e636052a4e37dae9d183d5aea49a8f (patch)
tree67a330df29790942f0405112eec5dc3f00668d69
parent7312b158302787e643027d349d581fe93b3de57e (diff)
vlr_auth_fsm: on SAI use the GSUP provided GMM cause codeHEADmaster
The HLR might respond with a specific GMM cause code. E.g. roaming not allowed which needs to be passed down the layers. Change-Id: I9af515dc52834b7c57c42fc3a76ee2c682734e2a
-rw-r--r--src/libvlr/vlr_auth_fsm.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/src/libvlr/vlr_auth_fsm.c b/src/libvlr/vlr_auth_fsm.c
index 60265104d..036c3d723 100644
--- a/src/libvlr/vlr_auth_fsm.c
+++ b/src/libvlr/vlr_auth_fsm.c
@@ -331,6 +331,7 @@ static void auth_fsm_wait_ai(struct osmo_fsm_inst *fi, uint32_t event,
struct auth_fsm_priv *afp = fi->priv;
struct vlr_subscr *vsub = afp->vsub;
struct osmo_gsup_message *gsup = data;
+ enum gsm48_reject_value gsm48_rej;
if (event == VLR_AUTH_E_HLR_SAI_NACK)
LOGPFSM(fi, "GSUP: rx Auth Info Error cause: %d: %s\n",
@@ -350,21 +351,21 @@ static void auth_fsm_wait_ai(struct osmo_fsm_inst *fi, uint32_t event,
afp->auth_tuple_max_reuse_count = -1;
goto pass;
}
- /* result = procedure error */
- auth_fsm_term(fi, GSM48_REJECT_NETWORK_FAILURE);
- return;
}
switch (event) {
case VLR_AUTH_E_HLR_SAI_ACK:
+ if (!gsup->num_auth_vectors) {
+ auth_fsm_term(fi, GSM48_REJECT_NETWORK_FAILURE);
+ return;
+ }
vlr_subscr_update_tuples(vsub, gsup);
goto pass;
break;
case VLR_AUTH_E_HLR_SAI_NACK:
- auth_fsm_term(fi,
- gsup->cause == GMM_CAUSE_IMSI_UNKNOWN?
- GSM48_REJECT_IMSI_UNKNOWN_IN_HLR
- : GSM48_REJECT_NETWORK_FAILURE);
+ case VLR_AUTH_E_HLR_SAI_ABORT:
+ vlr_gmm_cause_to_mm_cause(gsup->cause, &gsm48_rej);
+ auth_fsm_term(fi, gsm48_rej);
break;
}