diff options
Diffstat (limited to 'openbsc/src/gprs/sgsn_main.c')
-rw-r--r-- | openbsc/src/gprs/sgsn_main.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/openbsc/src/gprs/sgsn_main.c b/openbsc/src/gprs/sgsn_main.c index 2d3a0e4a9..b10b0b37f 100644 --- a/openbsc/src/gprs/sgsn_main.c +++ b/openbsc/src/gprs/sgsn_main.c @@ -315,9 +315,6 @@ int main(int argc, char **argv) handle_options(argc, argv); rate_ctr_init(tall_bsc_ctx); - rc = telnet_init(tall_bsc_ctx, &dummy_network, OSMO_VTY_PORT_SGSN); - if (rc < 0) - exit(1); ctrl = sgsn_controlif_setup(NULL, OSMO_CTRL_PORT_SGSN); if (!ctrl) { @@ -357,6 +354,14 @@ int main(int argc, char **argv) exit(2); } + /* start telnet after reading config for vty_get_bind_addr() */ + LOGP(DGPRS, LOGL_NOTICE, "VTY at %s %d\n", + vty_get_bind_addr(), OSMO_VTY_PORT_SGSN); + rc = telnet_init_dynif(tall_bsc_ctx, &dummy_network, + vty_get_bind_addr(), OSMO_VTY_PORT_SGSN); + if (rc < 0) + exit(1); + rc = sgsn_gtp_init(&sgsn_inst); if (rc) { LOGP(DGPRS, LOGL_FATAL, "Cannot bind/listen on GTP socket\n"); |