Change in ...osmo-sgsn[master]: sgsn: Reject PdpActReq if no GTP pdp ctx exists

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/.

pespin gerrit-no-reply at lists.osmocom.org
Thu Aug 29 12:45:02 UTC 2019


pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-sgsn/+/15330


Change subject: sgsn: Reject PdpActReq if no GTP pdp ctx exists
......................................................................

sgsn: Reject PdpActReq if no GTP pdp ctx exists

It could happen that SGSN drops GTP side of a pdp ctx (pdp->lib=NULL)
while still maintaing the other side (to notify about the entire pdp ctx
being torn down). If a PdpActReq arrives during that time, we need to
account for that situation, otherwise osmo-sgsn crashes accessing
pdp->lib.
If no pdp->lib is found at that time, let's reject the request and
expect at some point later in time the entire pdp context will be
destroyed and reestablished.

Related: OS#4173
Change-Id: I6dd87557ebb26fdbd280504abde10d976acecf64
---
M src/gprs/gprs_gmm.c
1 file changed, 5 insertions(+), 0 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-sgsn refs/changes/30/15330/1

diff --git a/src/gprs/gprs_gmm.c b/src/gprs/gprs_gmm.c
index e44b3ec..5a0f72f 100644
--- a/src/gprs/gprs_gmm.c
+++ b/src/gprs/gprs_gmm.c
@@ -2713,6 +2713,11 @@
 	/* Check if NSAPI is already in use */
 	pdp = sgsn_pdp_ctx_by_nsapi(mmctx, act_req->req_nsapi);
 	if (pdp) {
+		/* Make sure pdp ctx was not already torn down on GTP side */
+		if (!pdp->lib) {
+			gsm_cause = GSM_CAUSE_REACT_RQD;
+			goto no_context;
+		}
 		/* We already have a PDP context for this TLLI + NSAPI tuple */
 		if (pdp->sapi == act_req->req_llc_sapi &&
 		    pdp->ti == transaction_id) {

-- 
To view, visit https://gerrit.osmocom.org/c/osmo-sgsn/+/15330
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-sgsn
Gerrit-Branch: master
Gerrit-Change-Id: I6dd87557ebb26fdbd280504abde10d976acecf64
Gerrit-Change-Number: 15330
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin at sysmocom.de>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20190829/bf738b5e/attachment.htm>


More information about the gerrit-log mailing list