Change in osmo-pcap[master]: use telnet_init_dynif() to allow VTY bind to non-loopack address

laforge gerrit-no-reply at lists.osmocom.org
Sat Apr 24 11:04:25 UTC 2021


laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-pcap/+/23879 )

Change subject: use telnet_init_dynif() to allow VTY bind to non-loopack address
......................................................................

use telnet_init_dynif() to allow VTY bind to non-loopack address

Prior to this patch, you could configure 'bind 1.2.3.4' in the
config file, but the telnet interface still binds to 127.0.0.1.

Change-Id: I9b86b2cf6949917c55ea15277619cfa2b745185d
---
M src/osmo_client_main.c
M src/osmo_server_main.c
2 files changed, 2 insertions(+), 2 deletions(-)

Approvals:
  Jenkins Builder: Verified
  laforge: Looks good to me, approved



diff --git a/src/osmo_client_main.c b/src/osmo_client_main.c
index 831450d..0951115 100644
--- a/src/osmo_client_main.c
+++ b/src/osmo_client_main.c
@@ -259,7 +259,7 @@
 
 	osmo_tls_init();
 
-	rc = telnet_init(tall_cli_ctx, NULL, OSMO_VTY_PORT_PCAP_CLIENT);
+	rc = telnet_init_dynif(tall_cli_ctx, NULL, vty_get_bind_addr(), OSMO_VTY_PORT_PCAP_CLIENT);
 	if (rc < 0) {
 		LOGP(DCLIENT, LOGL_ERROR, "Failed to bind telnet interface\n");
 		exit(1);
diff --git a/src/osmo_server_main.c b/src/osmo_server_main.c
index 112bd47..b5f573c 100644
--- a/src/osmo_server_main.c
+++ b/src/osmo_server_main.c
@@ -271,7 +271,7 @@
 
 	osmo_tls_init();
 
-	rc = telnet_init(tall_srv_ctx, NULL, OSMO_VTY_PORT_PCAP_SERVER);
+	rc = telnet_init_dynif(tall_srv_ctx, NULL, vty_get_bind_addr(), OSMO_VTY_PORT_PCAP_SERVER);
 	if (rc < 0) {
 		LOGP(DCLIENT, LOGL_ERROR, "Failed to bind telnet interface\n");
 		exit(1);

-- 
To view, visit https://gerrit.osmocom.org/c/osmo-pcap/+/23879
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-pcap
Gerrit-Branch: master
Gerrit-Change-Id: I9b86b2cf6949917c55ea15277619cfa2b745185d
Gerrit-Change-Number: 23879
Gerrit-PatchSet: 1
Gerrit-Owner: laforge <laforge at osmocom.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge at osmocom.org>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20210424/5aa1c286/attachment.htm>


More information about the gerrit-log mailing list