aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/include/openbsc/gprs_sgsn.h
diff options
context:
space:
mode:
authorJacob Erlbeck <jerlbeck@sysmocom.de>2015-02-02 18:03:05 +0100
committerHolger Hans Peter Freyther <holger@moiji-mobile.com>2015-02-06 13:00:29 +0100
commit277b71e0d8b7a8c53599546b0d06ae3810a290eb (patch)
tree1946d33d8f56ae68939d9009a54c7c9adce656b6 /openbsc/include/openbsc/gprs_sgsn.h
parentf345612654720c63e29c75c0689e6955da478059 (diff)
sgsn: Select GGSN based on APN
Currently the APN IE in the Activate PDP Contex Request and the PDP data that is stored with the subscriber is ignored completely. This commit adds the sgsn_mm_ctx_find_ggsn_ctx that checks the APN IE against the subscriber's PDP data entries if both are present. If there is no match, the request is rejected. If an APN IE has not been included but PDP data entries are present, the function checks all of these entries against the static 'apn' configuration to find a suitable entry. If an APN has not been determined so far and any APN is allowed, the configuration is checked with an empty APN string, to allow for default configurations based on the IMSI prefix only. If nothing of this succeeded but the request wasn't rejected either, and there is no 'apn' configuration at all or if any APN is allowed but a default configuration ist not present, the GGSN with id 0 is used (if present). Otherwise the request is rejected ('missing APN'). Ticket: OW#1334 Sponsored-by: On-Waves ehf
Diffstat (limited to 'openbsc/include/openbsc/gprs_sgsn.h')
-rw-r--r--openbsc/include/openbsc/gprs_sgsn.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/openbsc/include/openbsc/gprs_sgsn.h b/openbsc/include/openbsc/gprs_sgsn.h
index 330cb9320..20d535205 100644
--- a/openbsc/include/openbsc/gprs_sgsn.h
+++ b/openbsc/include/openbsc/gprs_sgsn.h
@@ -21,6 +21,8 @@ struct gprs_llc_lle;
struct ctrl_handle;
struct gsm_subscriber;
+enum gsm48_gsm_cause;
+
/* TS 04.08 4.1.3.3 GMM mobility management states on the network side */
enum gprs_mm_state {
GMM_DEREGISTERED, /* 4.1.3.3.1.1 */
@@ -153,6 +155,9 @@ struct sgsn_mm_ctx *sgsn_mm_ctx_alloc(uint32_t tlli,
void sgsn_mm_ctx_free(struct sgsn_mm_ctx *mm);
void sgsn_mm_ctx_cleanup_free(struct sgsn_mm_ctx *ctx);
+struct sgsn_ggsn_ctx *sgsn_mm_ctx_find_ggsn_ctx(struct sgsn_mm_ctx *mmctx,
+ struct tlv_parsed *tp,
+ enum gsm48_gsm_cause *gsm_cause);
enum pdp_ctx_state {
PDP_STATE_NONE,