enable ctrl bind config for various programs
Add ctrl_vty_init() calls and feed the ctrl_vty_get_bind_addr() return value to
ctrl_interface_setup() in the following programs:
osmo-bsc
osmo-bsc_nat
osmo-nitb
osmo-sgsn
For osmo-sgsn, move the control interface setup invocation below the config
parsing, so that the ctrl_vty_get_bind_addr() can return the configured
address.
diff --git a/openbsc/src/gprs/sgsn_ctrl.c b/openbsc/src/gprs/sgsn_ctrl.c
index eff94e0..ccf5076 100644
--- a/openbsc/src/gprs/sgsn_ctrl.c
+++ b/openbsc/src/gprs/sgsn_ctrl.c
@@ -73,7 +73,8 @@
return rc;
}
-struct ctrl_handle *sgsn_controlif_setup(struct gsm_network *net, uint16_t port)
+struct ctrl_handle *sgsn_controlif_setup(struct gsm_network *net,
+ const char *bind_addr, uint16_t port)
{
- return ctrl_interface_setup(net, port, NULL);
+ return ctrl_interface_setup_dynip(net, bind_addr, port, NULL);
}