aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/src/gprs
diff options
context:
space:
mode:
authorJacob Erlbeck <jerlbeck@sysmocom.de>2014-12-22 17:58:18 +0100
committerHolger Hans Peter Freyther <holger@moiji-mobile.com>2014-12-23 15:15:13 +0100
commit7dba11fe32615fb5e49fae0a3bbd787ce4abc9b7 (patch)
treef0f1a7fb1023c26f1fb1f42afcc1e50e269f7591 /openbsc/src/gprs
parent3ea2260d00b42e6e5172d0db27aac30ca28d6640 (diff)
sgsn: Be more tolerant with state and SUSPEND/RESUME
Currently, when a BSSGP SUSPEND is received and the corresponding MM context is already in the state GMM_REGISTERED_SUSPENDED, a SUSPEND_NACK is returned which is not covered by GSM 08.18, 7.4.1. The same goes for RESUME in the state GMM_REGISTERED_NORMAL. This commit changes gprs_gmm_rx_suspend and gprs_gmm_rx_resume to not complain (and thus answer a NACK) when the MM context is either in GMM_REGISTERED_SUSPENDED or GMM_REGISTERED_NORMAL. Note that GSM 08.18, 7.4.1 and 7.5.1 only mention to send an NACK if the MS is not known. Even with this patch, the SGSN returns a NACK if either the MS is unknown _or_ the MM context ist not in one of the state GMM_REGISTERED_SUSPENDED and GMM_REGISTERED_NORMAL. Sponsored-by: On-Waves ehf
Diffstat (limited to 'openbsc/src/gprs')
-rw-r--r--openbsc/src/gprs/gprs_gmm.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/openbsc/src/gprs/gprs_gmm.c b/openbsc/src/gprs/gprs_gmm.c
index e59e1f056..da60fb87e 100644
--- a/openbsc/src/gprs/gprs_gmm.c
+++ b/openbsc/src/gprs/gprs_gmm.c
@@ -1952,7 +1952,8 @@ int gprs_gmm_rx_suspend(struct gprs_ra_id *raid, uint32_t tlli)
return -EINVAL;
}
- if (mmctx->mm_state != GMM_REGISTERED_NORMAL) {
+ if (mmctx->mm_state != GMM_REGISTERED_NORMAL &&
+ mmctx->mm_state != GMM_REGISTERED_SUSPENDED) {
LOGMMCTXP(LOGL_NOTICE, mmctx, "SUSPEND request while state "
"!= REGISTERED (TLLI=%08x)\n", tlli);
return -EINVAL;
@@ -1977,7 +1978,8 @@ int gprs_gmm_rx_resume(struct gprs_ra_id *raid, uint32_t tlli,
return -EINVAL;
}
- if (mmctx->mm_state != GMM_REGISTERED_SUSPENDED) {
+ if (mmctx->mm_state != GMM_REGISTERED_NORMAL &&
+ mmctx->mm_state != GMM_REGISTERED_SUSPENDED) {
LOGMMCTXP(LOGL_NOTICE, mmctx, "RESUME request while state "
"!= SUSPENDED (TLLI=%08x)\n", tlli);
/* FIXME: should we not simply ignore it? */