aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/src/gprs/sgsn_auth.c
diff options
context:
space:
mode:
authorJacob Erlbeck <jerlbeck@sysmocom.de>2015-01-05 17:51:17 +0100
committerHolger Hans Peter Freyther <holger@moiji-mobile.com>2015-01-18 18:14:49 +0100
commitaf3d5c508c9ca3ebae9388d3e09c5d7726db4f5c (patch)
tree00dbf95af936c1fc59196580d047265e1b0c1085 /openbsc/src/gprs/sgsn_auth.c
parentafcf23001e600bedc51db08a22846dada9bc06b3 (diff)
sgsn: Pass subscriber error causes to the GMM layer
This patch extends gsm0408_gprs_access_denied and gsm0408_gprs_access_cancelled to accept GMM cause codes. These are then passed to the MS, unless gsm0408_gprs_access_cancelled is called with cause 0 (no error -> updateProcedure). Since gsm0408_gprs_access_denied uses GMM_CAUSE_GPRS_NOTALLOWED if the cause is not set, and the subscriber's error_cause is never set (and thus always 0), the SGSN's behaviour does not change with this patch. Sponsored-by: On-Waves ehf Conflicts: openbsc/include/openbsc/gprs_sgsn.h [hfreyther: Conflict due the removal of the unused authenticate flag]
Diffstat (limited to 'openbsc/src/gprs/sgsn_auth.c')
-rw-r--r--openbsc/src/gprs/sgsn_auth.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/openbsc/src/gprs/sgsn_auth.c b/openbsc/src/gprs/sgsn_auth.c
index 9cc67db1c..9f526dcc1 100644
--- a/openbsc/src/gprs/sgsn_auth.c
+++ b/openbsc/src/gprs/sgsn_auth.c
@@ -207,6 +207,7 @@ void sgsn_auth_update(struct sgsn_mm_ctx *mmctx)
enum sgsn_auth_state auth_state;
struct gsm_subscriber *subscr = mmctx->subscr;
struct gsm_auth_tuple *at;
+ int gmm_cause;
auth_state = sgsn_auth_state(mmctx);
@@ -256,10 +257,12 @@ void sgsn_auth_update(struct sgsn_mm_ctx *mmctx)
gsm0408_gprs_access_granted(mmctx);
break;
case SGSN_AUTH_REJECTED:
+ gmm_cause = subscr->sgsn_data->error_cause;
+
if (subscr && (subscr->flags & GPRS_SUBSCRIBER_CANCELLED) != 0)
- gsm0408_gprs_access_cancelled(mmctx);
+ gsm0408_gprs_access_cancelled(mmctx, gmm_cause);
else
- gsm0408_gprs_access_denied(mmctx);
+ gsm0408_gprs_access_denied(mmctx, gmm_cause);
break;
default:
break;