aboutsummaryrefslogtreecommitdiffstats
path: root/ggsn
diff options
context:
space:
mode:
Diffstat (limited to 'ggsn')
-rw-r--r--ggsn/ggsn.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/ggsn/ggsn.c b/ggsn/ggsn.c
index 5852ef6..6c5c1a8 100644
--- a/ggsn/ggsn.c
+++ b/ggsn/ggsn.c
@@ -449,14 +449,14 @@ int create_context_ind(struct pdp_t *pdp)
/* First find an exact APN name match */
apn = ggsn_find_apn(ggsn, name_buf);
/* ignore if the APN has not been started */
- if (!apn->started)
+ if (apn && !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)
+ if (apn && !apn->started)
apn = NULL;
if (!apn) {