mirror of
https://gitea.osmocom.org/cellular-infrastructure/osmo-mgw.git
synced 2025-10-23 08:12:01 +00:00
sgsn: Deal with no static ggsn being configured at all
In case no static ggsn is configured the code would crash with the assumption that there is always such a GGSN.
This commit is contained in:
@@ -716,6 +716,13 @@ struct sgsn_ggsn_ctx *sgsn_mm_ctx_find_ggsn_ctx(struct sgsn_mm_ctx *mmctx,
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if (!ggsn) {
|
||||
LOGMMCTXP(LOGL_NOTICE, mmctx,
|
||||
"No static GGSN configured. Selected APN '%s'\n",
|
||||
selected_apn_str);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
LOGMMCTXP(LOGL_INFO, mmctx,
|
||||
"Found GGSN %d for APN '%s' (requested '%s')\n",
|
||||
ggsn->id, selected_apn_str ? selected_apn_str : "---",
|
||||
|
Reference in New Issue
Block a user