aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2017-10-01 18:28:18 +0800
committerHarald Welte <laforge@gnumonks.org>2017-10-01 18:29:41 +0800
commitb16c46b4c36383368eb1581e40d0a8ca751ddc53 (patch)
tree28b58f59da810f8dc52ae378e7771d2e93cfa5dc
parentcee7546f15bc66443c17a0b2cbca2570d85e3517 (diff)
create_context_ind(): ignore a non-started default APN
If the default APN has not been started, it is not eligible to be used in starting of new PDP contexts. Change-Id: I93b5c205c033f275824ee8bc8cdcf1428fb086df
-rw-r--r--ggsn/ggsn.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/ggsn/ggsn.c b/ggsn/ggsn.c
index f8aec9d..5852ef6 100644
--- a/ggsn/ggsn.c
+++ b/ggsn/ggsn.c
@@ -451,9 +451,14 @@ int create_context_ind(struct pdp_t *pdp)
/* ignore if the APN has not been started */
if (!apn->started)
apn = NULL;
+
/* then try default (if any) */
if (!apn)
apn = ggsn->cfg.default_apn;
+ /* ignore if the APN has not been started */
+ if (!apn->started)
+ apn = NULL;
+
if (!apn) {
/* no APN found for what user requested */
LOGPPDP(LOGL_NOTICE, pdp, "Unknown APN '%s', rejecting\n", name_buf);