diff options
Diffstat (limited to 'openbsc/src/osmo-bsc_nat')
-rw-r--r-- | openbsc/src/osmo-bsc_nat/bsc_nat.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/openbsc/src/osmo-bsc_nat/bsc_nat.c b/openbsc/src/osmo-bsc_nat/bsc_nat.c index 2d4f2a801..04c12e33f 100644 --- a/openbsc/src/osmo-bsc_nat/bsc_nat.c +++ b/openbsc/src/osmo-bsc_nat/bsc_nat.c @@ -1628,15 +1628,20 @@ int main(int argc, char **argv) osmo_stats_init(tall_bsc_ctx); /* init vty and parse */ - if (telnet_init(tall_bsc_ctx, NULL, OSMO_VTY_PORT_BSC_NAT)) { - fprintf(stderr, "Creating VTY telnet line failed\n"); - return -5; - } if (mgcp_parse_config(config_file, nat->mgcp_cfg, MGCP_BSC_NAT) < 0) { fprintf(stderr, "Failed to parse the config file: '%s'\n", config_file); return -3; } + /* start telnet after reading config for vty_get_bind_addr() */ + LOGP(DNAT, LOGL_NOTICE, "VTY at %s %d\n", + vty_get_bind_addr(), OSMO_VTY_PORT_BSC_NAT); + if (telnet_init_dynif(tall_bsc_ctx, NULL, vty_get_bind_addr(), + OSMO_VTY_PORT_BSC_NAT)) { + fprintf(stderr, "Creating VTY telnet line failed\n"); + return -5; + } + /* over rule the VTY config for MSC IP */ if (msc_ip) bsc_nat_set_msc_ip(nat, msc_ip); |