diff options
author | Harald Welte <laforge@gnumonks.org> | 2017-10-01 18:28:18 +0800 |
---|---|---|
committer | Harald Welte <laforge@gnumonks.org> | 2017-10-01 18:29:41 +0800 |
commit | b16c46b4c36383368eb1581e40d0a8ca751ddc53 (patch) | |
tree | 28b58f59da810f8dc52ae378e7771d2e93cfa5dc /ggsn/ggsn.c | |
parent | cee7546f15bc66443c17a0b2cbca2570d85e3517 (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
Diffstat (limited to 'ggsn/ggsn.c')
-rw-r--r-- | ggsn/ggsn.c | 5 |
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); |