diff options
author | Jacob Erlbeck <jerlbeck@sysmocom.de> | 2014-09-05 14:32:36 +0200 |
---|---|---|
committer | Holger Hans Peter Freyther <holger@moiji-mobile.com> | 2014-10-27 10:50:36 +0100 |
commit | 78ecaf0561bfed3f09ce9c180434da59e71202bd (patch) | |
tree | e90c99ff795d14d96ff37c358179a9e5581bbcab /openbsc/include | |
parent | 99985b5ea8e2d69d1e63a9423fbe40b872b0c0f5 (diff) |
sgsn: Send detach(re-attach) instead of gmm status if TLLI unknown
The osmo-sgsn sends Status messages (or nothing in case of non
GMM/GSM) when the TLLI is unknown. This prevents the MS from
reconnecting.
This patch adds the initiation of an MT detach procedure to force a
re-attach to set up a valid LLE context if an LLE or an MM context
cannot be found. Since this can also be triggered by non-GMM SAPI
messages, a GPRS application callback sgsn_force_reattach_oldmsg is
added which in turn calls the GMM layer to generate the GSM 04.08
specific messages.
Note that the MS can be left in REGISTERED state after initially
wanting to detach itself, since it will receive a Detach Req
(re-attach) when sending a DEACT PDP CTX REQ after the SGSN or
gbproxy (P-TMSI patching enabled) has been restarted. This same
behaviour has been observed with another SGSN.
Sponsored-by: On-Waves ehf
Diffstat (limited to 'openbsc/include')
-rw-r--r-- | openbsc/include/openbsc/gprs_gmm.h | 1 | ||||
-rw-r--r-- | openbsc/include/openbsc/gprs_llc.h | 1 | ||||
-rw-r--r-- | openbsc/include/openbsc/gprs_sgsn.h | 3 | ||||
-rw-r--r-- | openbsc/include/openbsc/gsm_04_08_gprs.h | 1 |
4 files changed, 6 insertions, 0 deletions
diff --git a/openbsc/include/openbsc/gprs_gmm.h b/openbsc/include/openbsc/gprs_gmm.h index f6b3e5e7c..e13b9dc65 100644 --- a/openbsc/include/openbsc/gprs_gmm.h +++ b/openbsc/include/openbsc/gprs_gmm.h @@ -11,6 +11,7 @@ int gsm48_tx_gsm_act_pdp_acc(struct sgsn_pdp_ctx *pdp); int gsm48_tx_gsm_deact_pdp_acc(struct sgsn_pdp_ctx *pdp); int gsm0408_gprs_rcvmsg(struct msgb *msg, struct gprs_llc_llme *llme); +int gsm0408_gprs_force_reattach(struct msgb *msg, struct sgsn_mm_ctx *mmctx); int gprs_gmm_rx_suspend(struct gprs_ra_id *raid, uint32_t tlli); int gprs_gmm_rx_resume(struct gprs_ra_id *raid, uint32_t tlli, diff --git a/openbsc/include/openbsc/gprs_llc.h b/openbsc/include/openbsc/gprs_llc.h index 9689a3766..fc6216ccc 100644 --- a/openbsc/include/openbsc/gprs_llc.h +++ b/openbsc/include/openbsc/gprs_llc.h @@ -207,6 +207,7 @@ int gprs_llc_tx_ui(struct msgb *msg, uint8_t sapi, int command, /* Chapter 7.2.1.2 LLGMM-RESET.req */ int gprs_llgmm_reset(struct gprs_llc_llme *llme); +int gprs_llgmm_reset_oldmsg(struct msgb* oldmsg, uint8_t sapi); /* 04.64 Chapter 7.2.1.1 LLGMM-ASSIGN */ int gprs_llgmm_assign(struct gprs_llc_llme *llme, diff --git a/openbsc/include/openbsc/gprs_sgsn.h b/openbsc/include/openbsc/gprs_sgsn.h index c9df82444..9226c23b9 100644 --- a/openbsc/include/openbsc/gprs_sgsn.h +++ b/openbsc/include/openbsc/gprs_sgsn.h @@ -229,6 +229,9 @@ int drop_all_pdp_for_ggsn(struct sgsn_ggsn_ctx *ggsn); char *gprs_pdpaddr2str(uint8_t *pdpa, uint8_t len); +/* Force re-attachment based on msgb meta data */ +int sgsn_force_reattach_oldmsg(struct msgb *oldmsg); + /* * ctrl interface related work */ diff --git a/openbsc/include/openbsc/gsm_04_08_gprs.h b/openbsc/include/openbsc/gsm_04_08_gprs.h index cd2a08c59..b96d22b87 100644 --- a/openbsc/include/openbsc/gsm_04_08_gprs.h +++ b/openbsc/include/openbsc/gsm_04_08_gprs.h @@ -70,6 +70,7 @@ enum gsm48_gprs_ie_mm { GSM48_IE_GMM_AUTH_RAND = 0x21, /* 10.5.3.1 */ GSM48_IE_GMM_AUTH_SRES = 0x22, /* 10.5.3.2 */ GSM48_IE_GMM_IMEISV = 0x23, /* 10.5.1.4 */ + GSM48_IE_GMM_CAUSE = 0x25, /* 10.5.5.14 */ GSM48_IE_GMM_DRX_PARAM = 0x27, /* 10.5.5.6 */ GSM48_IE_GMM_MS_NET_CAPA = 0x31, /* 10.5.5.12 */ GSM48_IE_GMM_PDP_CTX_STATUS = 0x32, /* 10.5.7.1 */ |