[PATCH] openbsc[master]: Support Deactivate PDP Context Request from network

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

pravin gerrit-no-reply at lists.osmocom.org
Thu Nov 17 06:59:33 UTC 2016


Review at  https://gerrit.osmocom.org/1262

Support Deactivate PDP Context Request from network

This commit will enable trigger of Deactivate PDP context Request message
based on the IMSI of the subscriber.

Change-Id: Ia0a41aa2218ec2fda4ea17a37c8cc55cba63dd13
---
M openbsc/include/openbsc/gprs_sgsn.h
M openbsc/src/gprs/gprs_sgsn.c
2 files changed, 17 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/openbsc refs/changes/62/1262/1

diff --git a/openbsc/include/openbsc/gprs_sgsn.h b/openbsc/include/openbsc/gprs_sgsn.h
index 24e286c..c72171a 100644
--- a/openbsc/include/openbsc/gprs_sgsn.h
+++ b/openbsc/include/openbsc/gprs_sgsn.h
@@ -369,6 +369,8 @@
  * ottherwise lost state (recovery procedure) */
 int drop_all_pdp_for_ggsn(struct sgsn_ggsn_ctx *ggsn);
 
+void drop_pdp_for_ms(const char *imsi);
+
 char *gprs_pdpaddr2str(uint8_t *pdpa, uint8_t len);
 
 /*
diff --git a/openbsc/src/gprs/gprs_sgsn.c b/openbsc/src/gprs/gprs_sgsn.c
index e5a54d9..99b04a4 100644
--- a/openbsc/src/gprs/gprs_sgsn.c
+++ b/openbsc/src/gprs/gprs_sgsn.c
@@ -667,6 +667,21 @@
 	}
 }
 
+/* High-level function to be called for PDP deactivation initiated from SGSN */
+void drop_pdp_for_ms(const char *imsi)
+{
+	OSMO_ASSERT(imsi != NULL);
+	struct sgsn_mm_ctx *mm;
+	struct sgsn_pdp_ctx *pdp;
+
+	/* Search the PDP for this subscriber */
+	mm = sgsn_mm_ctx_by_imsi(imsi);
+	llist_for_each_entry(pdp, &mm->pdp_list, list) {
+		gsm48_tx_gsm_deact_pdp_req(pdp, GSM_CAUSE_DEACT_REGULAR);
+		LOGPDPCTXP(LOGL_NOTICE, pdp, "SGSN initiated Deactivate PDP\n");
+	}
+}
+
 /* High-level function to be called in case a GGSN has disappeared or
  * otherwise lost state (recovery procedure) */
 int drop_all_pdp_for_ggsn(struct sgsn_ggsn_ctx *ggsn)

-- 
To view, visit https://gerrit.osmocom.org/1262
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia0a41aa2218ec2fda4ea17a37c8cc55cba63dd13
Gerrit-PatchSet: 1
Gerrit-Project: openbsc
Gerrit-Branch: master
Gerrit-Owner: pravin <pravin.manoharan at radisys.com>



More information about the gerrit-log mailing list