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

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
---
M ggsn/ggsn.c
1 file changed, 5 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-ggsn refs/changes/21/4121/1

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 @@
        /* 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);

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I93b5c205c033f275824ee8bc8cdcf1428fb086df
Gerrit-PatchSet: 1
Gerrit-Project: osmo-ggsn
Gerrit-Branch: master
Gerrit-Owner: Harald Welte <[email protected]>

Reply via email to