aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc
diff options
context:
space:
mode:
authorNeels Hofmeyr <nhofmeyr@sysmocom.de>2016-09-28 13:44:39 +0200
committerNeels Hofmeyr <nhofmeyr@sysmocom.de>2016-09-29 03:24:57 +0200
commitc6a44bbab90bfc67ffcf6b5057197fff3b733bdc (patch)
treed0ebb697fab6c6de53c557aae7101738003cf6dc /openbsc
parentcaeb62d7ffc6fc0de7101c53a725d12bf3aa4f85 (diff)
fix: send SNDCP XID only on GERAN Gb contexts
Add a condition for GERAN Gb. SNDCP and IuPS were developed on separate branches, and the merge results in code trying to use an llme on a UTRAN Iu context where the llme is NULL, leading to stack corruption upon PDP ctx act. Change-Id: Ibb20d738c1b64d36630ce8eceb54c33ba4f1b003
Diffstat (limited to 'openbsc')
-rw-r--r--openbsc/src/gprs/sgsn_libgtp.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/openbsc/src/gprs/sgsn_libgtp.c b/openbsc/src/gprs/sgsn_libgtp.c
index 127ee30ba..29c9f066a 100644
--- a/openbsc/src/gprs/sgsn_libgtp.c
+++ b/openbsc/src/gprs/sgsn_libgtp.c
@@ -331,11 +331,13 @@ static int send_act_pdp_cont_acc(struct sgsn_pdp_ctx *pctx)
if (rc < 0)
return rc;
- /* Send SNDCP XID to MS */
- lle = &pctx->mm->gb.llme->lle[pctx->sapi];
- rc = sndcp_sn_xid_req(lle,pctx->nsapi);
- if (rc < 0)
- return rc;
+ if (pctx->mm->ran_type == MM_CTX_T_GERAN_Gb) {
+ /* Send SNDCP XID to MS */
+ lle = &pctx->mm->gb.llme->lle[pctx->sapi];
+ rc = sndcp_sn_xid_req(lle,pctx->nsapi);
+ if (rc < 0)
+ return rc;
+ }
return 0;
}