This is merely a historical archive of years 2008-2021, before the migration to mailman3.
A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.
Max gerrit-no-reply at lists.osmocom.orgMax has submitted this change and it was merged. ( https://gerrit.osmocom.org/11457 )
Change subject: mobile: fix vty bind ip override
......................................................................
mobile: fix vty bind ip override
Previously the vty bind config parameter was always ignored. Fix this by using proper
default value from the config unless it's explicitly set via command-line parameter.
Change-Id: I32517567847fd5c54b1742f18bf409ff81e316fa
---
M src/host/layer23/src/mobile/main.c
1 file changed, 4 insertions(+), 3 deletions(-)
Approvals:
Jenkins Builder: Verified
Vadim Yanitskiy: Looks good to me, but someone else must approve
Pau Espin Pedrol: Looks good to me, approved
diff --git a/src/host/layer23/src/mobile/main.c b/src/host/layer23/src/mobile/main.c
index 115ac41..297a534 100644
--- a/src/host/layer23/src/mobile/main.c
+++ b/src/host/layer23/src/mobile/main.c
@@ -31,6 +31,7 @@
#include <osmocom/core/gsmtap.h>
#include <osmocom/core/signal.h>
#include <osmocom/core/application.h>
+#include <osmocom/vty/vty.h>
#include <arpa/inet.h>
@@ -51,7 +52,7 @@
static char *gsmtap_ip = 0;
static const char *custom_cfg_file = NULL;
struct gsmtap_inst *gsmtap_inst = NULL;
-static char *vty_ip = "127.0.0.1";
+static char *vty_ip = NULL;
unsigned short vty_port = 4247;
char *config_dir = NULL;
int use_mncc_sock = 0;
@@ -90,7 +91,7 @@
printf(" -u --vty-ip The VTY IP to telnet to. "
"(default %s)\n", vty_ip);
printf(" -v --vty-port The VTY port number to telnet to. "
- "(default %u)\n", vty_port);
+ "(default %s)\n", vty_get_bind_addr());
printf(" -d --debug Change debug flags. default: %s\n",
debug_default);
printf(" -D --daemonize Run as daemon\n");
@@ -248,7 +249,7 @@
config_dir = dirname(config_dir);
if (use_mncc_sock)
- rc = l23_app_init(mncc_recv_socket, config_file, vty_ip, vty_port);
+ rc = l23_app_init(mncc_recv_socket, config_file, vty_ip ? vty_ip : vty_get_bind_addr(), vty_port);
else
rc = l23_app_init(NULL, config_file, vty_ip, vty_port);
if (rc)
--
To view, visit https://gerrit.osmocom.org/11457
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmocom-bb
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I32517567847fd5c54b1742f18bf409ff81e316fa
Gerrit-Change-Number: 11457
Gerrit-PatchSet: 3
Gerrit-Owner: Max <msuraev at sysmocom.de>
Gerrit-Reviewer: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Jenkins Builder (1000002)
Gerrit-Reviewer: Max <msuraev at sysmocom.de>
Gerrit-Reviewer: Pau Espin Pedrol <pespin at sysmocom.de>
Gerrit-Reviewer: Vadim Yanitskiy <axilirator at gmail.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20181120/b0cfa1c2/attachment.htm>