diff options
Diffstat (limited to 'openbsc/src/gprs/gtphub.c')
-rw-r--r-- | openbsc/src/gprs/gtphub.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/openbsc/src/gprs/gtphub.c b/openbsc/src/gprs/gtphub.c index 8af3ff7ec..8e1649734 100644 --- a/openbsc/src/gprs/gtphub.c +++ b/openbsc/src/gprs/gtphub.c @@ -1781,7 +1781,14 @@ int gtphub_start(struct gtphub *hub, struct gtphub_cfg *cfg) int rc; gtphub_init(hub); - gtphub_ares_init(hub); + + /* If a Ctrl plane proxy is configured, ares will never be used. */ + if (!cfg->ggsn_proxy[GTPH_PLANE_CTRL].addr_str) { + if (gtphub_ares_init(hub) != 0) { + LOG(LOGL_FATAL, "Failed to initialize ares\n"); + return -1; + } + } /* TODO set hub->restart_counter from external file. */ @@ -1806,7 +1813,6 @@ int gtphub_start(struct gtphub *hub, struct gtphub_cfg *cfg) } } - for (plane_idx = 0; plane_idx < GTPH_PLANE_N; plane_idx++) { if (gtphub_make_proxy(hub, &hub->sgsn_proxy[plane_idx], |