aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/src/gprs/gprs_gmm.c
diff options
context:
space:
mode:
authorDaniel Willmann <dwillmann@sysmocom.de>2016-05-11 12:43:47 +0200
committerNeels Hofmeyr <nhofmeyr@sysmocom.de>2016-09-02 04:29:36 +0200
commit21b269f81454919a379d22b9c2be74bb680be500 (patch)
tree5992fb605de8076e9ccb8e55217203d9905f5c2a /openbsc/src/gprs/gprs_gmm.c
parentc17cdb40b545a5006e9b97e76559d7a4b46e030d (diff)
IuPS: Change GTP-U endpoint to SGSN in PMM_IDLE and page UE when data arrives
Diffstat (limited to 'openbsc/src/gprs/gprs_gmm.c')
-rw-r--r--openbsc/src/gprs/gprs_gmm.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/openbsc/src/gprs/gprs_gmm.c b/openbsc/src/gprs/gprs_gmm.c
index cb3d4eeb7..3d7464755 100644
--- a/openbsc/src/gprs/gprs_gmm.c
+++ b/openbsc/src/gprs/gprs_gmm.c
@@ -109,6 +109,16 @@ static const struct tlv_definition gsm48_sm_att_tlvdef = {
static int gsm48_gmm_authorize(struct sgsn_mm_ctx *ctx);
+static void mmctx_change_gtpu_endpoints_to_sgsn(struct sgsn_mm_ctx *mm_ctx)
+{
+ struct sgsn_pdp_ctx *pdp;
+ llist_for_each_entry(pdp, &mm_ctx->pdp_list, list) {
+ sgsn_pdp_upd_gtp_u(pdp,
+ &sgsn->cfg.gtp_listenaddr.sin_addr,
+ sizeof(sgsn->cfg.gtp_listenaddr.sin_addr));
+ }
+}
+
void mmctx_set_pmm_state(struct sgsn_mm_ctx *ctx, enum gprs_pmm_state state)
{
if (ctx->pmm_state == state)
@@ -120,7 +130,8 @@ void mmctx_set_pmm_state(struct sgsn_mm_ctx *ctx, enum gprs_pmm_state state)
{
switch (state) {
case PMM_IDLE:
- /* TODO: Change GTP-U endpoints to SGSN, start RA Upd timer */
+ /* TODO: start RA Upd timer */
+ mmctx_change_gtpu_endpoints_to_sgsn(ctx);
break;
case PMM_CONNECTED:
break;